For example, what is a code for plotting y = x so that y- and x-axis have the same scale ?
3 Answers
The axes can be made the same size using the same_xy option:
plot2d(x, [x,-1,1], [same_xy]);
or
plot2d(x, [x,-1,1], [same_xy, true]);
There is a same_xyz option for three dimensional plots.

- 660
- 5
- 9
-
The `"set size ratio -1"` option didn't work (at least with `wximplicit_plot`), and yours finally did. – Evgenia Karunus Nov 28 '20 at 08:51
If you're using the draw
or draw3d
function (or animated versions of those), then you have to pass the proportional_axes
graphic option as an argument.
For example proportional_axes = xy
in 2D.
See more:
http://maxima.sourceforge.net/docs/manual/de/maxima_42.html
(Search for "proportional_axes".)

- 2,418
- 3
- 29
- 35
Maxima, by default, uses gnuplot to produce 2d graphics.
If you're using this default, then you need to set the gnuplot_preamble
, e.g.
plot2d(x, [x,-1,1], [gnuplot_preamble, "set size ratio -1"])$
Note the -1
means that gnuplot tries to set the scales so that the unit has the same length on both axes, while +1
sets the aspect ratio ignoring the axis scales.
To make this the default, type
set_plot_option ([gnuplot_preamble, "set size ratio -1"])$
If you want to find out more about the gnuplot size options, run gnuplot
from your terminal and type help set size
into the console.
n.b. Most basic questions you can have about Maxima can be found somewhere in their mailing list archive: http://maxima.sourceforge.net/maximalist.html

- 14,631
- 4
- 41
- 101