Closed phil-blain closed 2 years ago
Hi @phil-blain! I don't see ax.set_[xy]lim
in the "Putting this all together" section, so the ax2.set_[xy]lim
are needed to set the limits. I think that it would probably be clearer to set the limits in the first subplot instead of the second, but they seem to be equivalent.
Oh sorry you are right. Yes, maybe setting the limits in the first subplot would be slightly clearer.
Hi!
I noticed that the second subplot in the "Putting this all together" section uses
ax2.set_[xy]lim
:https://github.com/ProjectPythia/pythia-foundations/blob/9c3a75be8dffce205c714674942d7ec9323bdd92/core/matplotlib/matplotlib-basics.ipynb?short_path=59de0a2#L632-L633
even if it's created earlier with
sharex=ax, sharey=ax
: https://github.com/ProjectPythia/pythia-foundations/blob/9c3a75be8dffce205c714674942d7ec9323bdd92/core/matplotlib/matplotlib-basics.ipynb?short_path=59de0a2#L616From what I see the axes limit set by
ax.set_[xy]lim
are ignored. Maybe these two calls could be removed, or a comment added mentioning that they are ignored because ofshare[xy]=ax
?