proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.12k stars 102 forks source link

Error in sharing axis #465

Open cvanelteren opened 1 month ago

cvanelteren commented 1 month ago

Description

Sharing axis does not perform well in scatter or plot. I noticed this the other day when plotting data that is in different ranges. First, we notice how the sharing of the axis will differ depending on the order or plotting. Second, we notice how in both cases the range is not properly adjusted.

image image

Steps to reproduce

import proplot as plt, numpy as np

x = np.random.rand(10)
y = np.random.rand(10)
fig, ax = plt.subplots(ncols = 2)
ax[0].scatter(x, y)
ax[1].scatter(x, y * 10)
fig.show()

fig, ax = plt.subplots(ncols = 2)
ax[0].scatter(x, y * 10)
ax[1].scatter(x, y)
fig.show()

Proplot version

mpl 3.9.2 proplot '0.9.91.post4+dirty'