gonum / gonum/plot

plot: The aspect ratio can't be specified

Open
#443 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.