proplot
proplot copied to clipboard
Possible bug when sharing x axis in subplots.
Description
When I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug to me.
Steps to reproduce
fig,axs = pplt.subplots(nrows=2,ncols=1, sharex=True)
axs[0].scatter([0,10],[0,1])
axs[1].scatter([0,1],[0,1])
Expected behavior:
I would expect 2 plots, one on top of the other, with the x axis aligned so that I see 2 points on the very right on top, and two points on the very left in the bottom (see below for matplotlib output)
Actual behavior:
With proplot I get the following plot:
Equivalent steps in matplotlib
I can do something similar with matplotlib
fig = plt.figure()
ax1 = plt.subplot(211)
plt.scatter([0,10],[0,1])
plt.subplot(212, sharex = ax1)
plt.scatter([0,1],[0,1])
obtaining
Proplot version
matplotlib: 3.8.4 proplot: 0.9.91