-
Notifications
You must be signed in to change notification settings - Fork 15
Description
According to doc of ultraplot.subplots (or ultraplot.Figure), there are four levels of axis sharing.
-
0 or False: No axis sharing. This also sets the default spanx and spany values to False.
-
1 or 'labels' or 'labs': Only draw axis labels on the bottommost row or leftmost column of subplots. Tick labels still appear on every subplot.
-
2 or 'limits' or 'lims': As above but force the axis limits, scales, and tick locations to be identical. Tick labels still appear on every subplot.
-
3 or True: As above but only show the tick labels on the bottommost row and leftmost column of subplots.
-
4 or 'all': As above but also share the axis limits, scales, and tick locations between subplots not in the same row or column.
However, I found that ultraplot does not respect this convention exactly in ultraplot=1.60.2.
For example, share=1
, share="labs"
, share=labels
do not provide the expected behavior (though these options do provide identical results).
Here is a minimum example:
%matplotlib
import ultraplot as uplt
fig, axs = uplt.subplots(None, 2, 3, sharey='labels')
axs.format(ylabel='PDF')
fig, axs = uplt.subplots(None, 2, 3, sharey='labs')
axs.format(ylabel='PDF')
fig, axs = uplt.subplots(None, 2, 3, sharey=1)
axs.format(ylabel='PDF')
In contrast, ultraplot=1.50 works as expected (left panels in screenshot below).

However, interestingly, I notice that the example in userguide using uplt.figure
works as expected.
So there seems an inconsistency between uplt.subplots and Figure.subplots?
BTW, also note that in the user guide, point 3 does not provide the full list of the five available options (compare to proplot), though it says "five" just above the list.
Is this change intentional or a misoperation?