Discussion:
On Windows Maxima plot window isn't square
Henry Baker
2013-02-21 22:07:57 UTC
Permalink
When I run plot2d on the Maxima shown below, the plot window doesn't
come up as square, so circles come out as ellipses.

Note that the plot is fine as far as Maxima & plot2d is concerned; the
problem is that the aspect ratio of the window it's being drawn in is
off.

If I "resize" the window using the mouse to make it square, then the plot looks fine.

Is there any way of initializing the plot window so it comes up square by default?

Maxima 5.28.0-2 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)
Pepe Sanchez
2013-02-22 08:30:12 UTC
Permalink
Post by Henry Baker
When I run plot2d on the Maxima shown below, the plot window doesn't
come up as square, so circles come out as ellipses.
Note that the plot is fine as far as Maxima & plot2d is concerned; the
problem is that the aspect ratio of the window it's being drawn in is
off.
The following command line works in windows wxMaxima (and in McaOSX also)
The plotting external frame is not square, but the plot ityself has aspect ratio 1


wxplot2d([cos(9*ph+2.5)], [ph,0,2*%pi],[x,-1,1],
[gnuplot_preamble, "set polar; set zeroaxis; set size ratio 1"])$

Incidentally: In recent versions of GNU the indication [x,-1,1] or similar are required
in polar plots (2D and 3D) in order to get the whole conventional plot centered in the frame... This was not necesary at all
in older versions (some two years ago)


Best


________________________________________________________________
Jose Sanchez-Marin.
Universitat de Valencia.
Institut de Ciencia Molecular (ICMol).
Cat. Jose Beltran Martinez, 2 Phone: +34 96 354 4444
E-46980 Paterna FAX: +34 96 354 3576
Spain e-mail: ***@uv.es
_________________________________________________________________
Jaime Villate
2013-02-22 12:18:49 UTC
Permalink
Post by Henry Baker
When I run plot2d on the Maxima shown below, the plot window doesn't
come up as square, so circles come out as ellipses.
Note that the plot is fine as far as Maxima & plot2d is concerned; the
problem is that the aspect ratio of the window it's being drawn in is
off.
If I "resize" the window using the mouse to make it square, then the plot looks fine.
Is there any way of initializing the plot window so it comes up square by default?
Hi,
you forgot to show us your plot2d command, but here is an example:

plot2d([sqrt(9-x^2),
-sqrt(9-x^2)],[x,-3,3],[legend,false],[gnuplot_preamble,"set size ratio
1"]);

(it works fine in the wxt gnuplot terminal in Ubuntu, but it might fail
in other gnuplot terminals)

Another method:

plot2d([sqrt(9-x^2),
-sqrt(9-x^2)],[x,-3,3],[legend,false],[plot_format,xmaxima]);

Regards,
Jaime
Adam
2013-02-22 14:59:52 UTC
Permalink
Post by Jaime Villate
Post by Henry Baker
When I run plot2d on the Maxima shown below, the plot window doesn't
come up as square, so circles come out as ellipses.
Note that the plot is fine as far as Maxima & plot2d is concerned; the
problem is that the aspect ratio of the window it's being drawn in is
off.
If I "resize" the window using the mouse to make it square, then the plot looks fine.
Is there any way of initializing the plot window so it comes up square by default?
Hi,
plot2d([sqrt(9-x^2),
-sqrt(9-x^2)],[x,-3,3],[legend,false],[gnuplot_preamble,"set size ratio
1"]);
(it works fine in the wxt gnuplot terminal in Ubuntu, but it might fail
in other gnuplot terminals)
plot2d([sqrt(9-x^2),
-sqrt(9-x^2)],[x,-3,3],[legend,false],[plot_format,xmaxima]);
Regards,
Jaime
square is a synonym for ratio 1.

so it can be also :

plot2d([sqrt(9-x^2),
-sqrt(9-x^2)],[x,-3,3],[legend,false],[gnuplot_preamble,"set size square"]);

See
http://gnuplot.sourceforge.net/docs_4.2/node230.html

HTH

Adam

Loading...