[Matplotlib-users] sharex

The web documentation for matplotlib.axes.Axes.sharex state that Axes.sharex(ax) “is equivalent to passing sharex=ax when constructing the axes”

I found it’s not really true, at least in interactive mode.

When we use add_axes(…, sharex=…), the Axis is shared and the xlims and ticks are also shared.

If we use Axes.sharex=ax the xlims and xticks are not shared.

Maybe there’s a purpose for the discrepancy, but I can’t understand it.

Comments please!

PS: tested with mpl3.3.4 and python3.8

Forget my previous post.
Problem is mine.
Sorry.

···

The web documentation for matplotlib.axes.Axes.sharex state that
Axes.sharex(ax) "is equivalent to passing sharex=ax when
constructing the axes"
I found it's not really true, at least in interactive mode.
When we use add_axes(..., sharex=...), the Axis is shared and the
xlims and ticks are also shared.
If we use Axes.sharex=ax the xlims and xticks are not shared.
Maybe there's a purpose for the discrepancy, but I can't
understand it.
Comments please!
PS: tested with mpl3.3.4 and python3.8

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@python.org
https://mail.python.org/mailman/listinfo/matplotlib-users