-
-
Notifications
You must be signed in to change notification settings - Fork 355
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 meta-issue #2424
Comments
Does this merge assist in any way? Apparently as of matplotlib 3.3.0, this will give correct equal aspect ratio in 3D (taken from here): import numpy as np
xs, ys, zs = <your data>
ax = <your axes>
# Option 1: aspect ratio is 1:1:1 in data space
ax.set_box_aspect((np.ptp(xs), np.ptp(ys), np.ptp(zs)))
# Option 2: aspect ratio 1:1:1 in view space
ax.set_box_aspect((1, 1, 1)) |
It seems like losssurface = plot(-5:0.1:5, -5:0.1:5, f, st=:contour, title="Losssurface")
plot!(
losssurface,
decent_steps[1,:],
decent_steps[2,:],
markershape=:circle,
arrow=:arrow,
label="Path of Gradient Decent",
aspect_ratio=1
)
loss = plot(
mapslices(f, decent_steps;dims=(1))',
st=:scatter,
label=missing,
title="Loss",
xlabel="Iteration",
)
plot(losssurface, loss, layout=grid(1,2, widths=[0.7,0.3])) Without the using the keyword |
I have had a similar issues, mine manifested whenever i was trying to look at the axes limits. See #3479 (comment) |
Would be nice to work over and consider how aspect ratio works in Plots.
The main issue being the relationship between plot aspect ratio and data aspect, and how they behave in layouts.
Relevant issues:
aspect_ratio = :equal
withlegend = false
not correct forplotlyjs()
aspect_ratio = :equal
withlegend = false
not correct forplotlyjs()
#1603aspect_ratio
breakslink
aspect_ratio
breakslink
#1990aspect_ratio
does not fully work with pgfplots()aspect_ratio
does not fully work with pgfplots() #2037The text was updated successfully, but these errors were encountered: