plot icon indicating copy to clipboard operation
plot copied to clipboard

plot: The aspect ratio can't be specified

Open ctessum opened this issue 6 years ago • 1 comments

What are you trying to do?

I would like to be able to specify the aspect ratio of the plots, for instance to make sure geometric shapes look right and make sure the 1:1 line in scatter plots is at 45 degrees: For example: https://matplotlib.org/gallery/subplots_axes_and_figures/axis_equal_demo.html

I think, in terms of API, this could be accomplished by adding an Aspect field to plot.Plot. With the default 0 value, the aspect ratio would be determined based on the size of the canvas as normal, but if it is set to a positive number (e.g., 1) then the aspect ratio would be forced to that number.

What version of Go and Gonum/plot are you using?

go 1.10 07f44254b21cff40a59809f4c926aa023286107d

Does this issue reproduce with the current master?

yes

ctessum avatar Apr 12 '18 05:04 ctessum

I would love this very much, too. I've recently hacked on a simple Go package which allows to draw ellipse only to realize there is no way to specify the aspect ratio, so the ellipses look like circles :-/

milosgajdos avatar Nov 04 '18 20:11 milosgajdos