Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aspect Ratio Not Working [BUG] #4201

Closed
chelseas opened this issue May 10, 2022 · 5 comments
Closed

Aspect Ratio Not Working [BUG] #4201

chelseas opened this issue May 10, 2022 · 5 comments
Labels

Comments

@chelseas
Copy link

Details

I am trying to use aspect_ratio=:equal but it doesn't seem to be doing anything ...?

Code:

plot(range(-1, stop=1, length=31) , zeros(31), color=:blue, aspect_ratio=1.0)

or

plot(range(-1, stop=1, length=31) , zeros(31), color=:blue, aspect_ratio=:equal)

Result:
image

Backends

Plotly and GR

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotly x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots.jl version: [91a5bcdd] Plots v1.29.0
Backend version (]st -m <backend(s)>):
[28b8d3ca] GR v0.64.2
Can't find plotly version
Output of versioninfo():
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD Ryzen 7 4800H with Radeon Graphics
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, znver2)

@chelseas chelseas added the bug label May 10, 2022
@BeastyBlacksmith
Copy link
Member

If you compare it to the version without aspect_ratio = 1 you will see a difference. What is the output you would expect instead?

@chelseas
Copy link
Author

chelseas commented May 12, 2022 via email

@BeastyBlacksmith
Copy link
Member

If you take into account that you have twice the ticks on the y axis than on the x axis they are square.

@chelseas
Copy link
Author

chelseas commented May 12, 2022 via email

@eduardkieser
Copy link

eduardkieser commented Feb 22, 2024

This does not seem to work on my setup.
Julia 1.9.4
Plots v1.39.0
PlotlyJS v0.18.12

using Plots
plotly()  
xs = [1,2,3, 4]  
ys = [10,20,30, 40]  
scatter(xs, ys, aspect_ratio=1)  

I can pass any number as well as :equal to the aspect_ratio argument without any affect on the plot.

..follow up. more testing with the same setup, now confirms that it does work.

..2nd follow up. The problem is back again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants