You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frommatplotviewimportviewimportmatplotlib.pyplotaspltfig, (ax1, ax2) =plt.subplots(1, 2)
# Plot a line in the first axes.ax1.plot([iforiinrange(10)], "-o")
ax1.set(xscale="log", yscale="log") # <--------- added this line# Create a view! Turn axes 2 into a view of axes 1.view(ax2, ax1)
# Modify the second axes data limits so we get a slightly zoomed out viewax2.set_xlim(-5, 15)
ax2.set_ylim(-5, 15)
fig.show()
Actual result (using view)
Expected result (plotting the data twice)
Passing scale_lines=False to the view improves the situation a bit, but still the markers are distorted:
Actual result (using view with scale_lines=False)
Expected result (plotting the data twice)
Can we have something like scale_artists=False which applies to all artists (markers, text annotations, etc.) and not just lines?
Or even scale=False which applies to everything?
The text was updated successfully, but these errors were encountered:
Using views on log-scaled axes results in distorted artists and gives unexpected results compared to plotting the same data twice.
To reproduce, modify the simple example slightly
Passing
scale_lines=False
to the view improves the situation a bit, but still the markers are distorted:scale_lines=False
)Can we have something like
scale_artists=False
which applies to all artists (markers, text annotations, etc.) and not just lines?Or even
scale=False
which applies to everything?The text was updated successfully, but these errors were encountered: