[Date Index]
[Thread Index]
[Author Index]
Aspect Ratio -> 1 and copy-and-paste of figures
*To*: mathgroup at smc.vnet.net
*Subject*: [mg72278] Aspect Ratio -> 1 and copy-and-paste of figures
*From*: Virgil Stokes <vs at it.uu.se>
*Date*: Mon, 18 Dec 2006 06:55:35 -0500 (EST)
I am using vers. 5.2.0.0 on a Win2k platform and after some careful testing have
found that the option AspectRatio in Graphics is not working properly on my system.
When I execute the following two commands (the first comes directly from Help on
AspectRatio) the figure plotted on the screen (and on my printer's output) is
not a circle.
Show[Graphics[Circle[{0,0},1],AspectRatio\[Rule]Automatic]];
Show[Graphics[Circle[{0,0},1],AspectRatio\[Rule]1]];
For example on my home PC monitor, the displayed circles have a width
(horizontal) of 9.05cm and a height (vertical) of 9.6cm which means that the
"circle" is not plotted as a circle; but an ellipse (aspect ratio measured > 1).
Note, I have been very careful in making these measurements directly on two
different monitors and neither gives a perfect circle! I have also generated
perfect circles in Corel Draw (vers. 13) and what is shown on my monitors and
outputted to my printers are indeed perfect circles. Interestingly, if I copy
and paste these circles into Corel Draw, they have an aspect ratio of 1.
However, when I copy and paste some of my other figures (created with
AspectRatio->1, in Mathematica using Plot or ParametricPlot), edges of these are
often lost and the aspect ratio is incorrect. I have been unable to identify any
consistent pattern in the missing part of the image, except that it is often the
lower right parts of the image. For example, if I plot some function in the
region 0 <= x <= 6, 0 <= y <= 6, with an AspectRatio->1, and
PlotRange->{{0,6},{0,6}} then again the height of the figure produced on my
monitor is greater than its width. If I copy and paste this figure into Corel
Draw, then the x-axis is terminated at x=5.4 (not at x=6 as in the figure shown
in Mathematica) and the lower half of the tic labels along the x-axis are lost.
The following code shows both these problems on my system:
vars = {x[t], y[t]};
f = x[t] (p - q*y[t]);
g = y[t] (-P + Q*x[t]);
eqns = {x'[t] == f, y'[t] == g}
p = 3.0; q = 2;
P = 2.5; Q = 1;
eqns
inits = {x[0] == 2.5, y[0] == 0.5};
sol = vars /. NDSolve[Join[eqns, inits], vars, {t, 0, 10}][[1]];
p0 = ParametricPlot[sol, {t, 0, 2.5}, PlotRange -> {{0, 6}, {0,
6}}, AspectRatio -> Automatic, AxesLabel -> {"prey", "predator"}];
These two problems, loss of parts of a figure in a copy-and-paste, and incorrect
display of aspect ratio may be related. I will be glad to provide a Mathematica
notebook which contains further examples of both these problems.
--V. Stokes
Prev by Date:
**Re: Problems with Set, SetDelayed and replacement rules...**
Next by Date:
**Re: system of nonlinear equations in mathematica?**
Previous by thread:
**Re: Limit and Root Objects**
Next by thread:
**Using Mathematica to solve Smullyan "Scheherazade" puzzle?**
| |