In the plot below, each axes is yaxis-shared with the axes in the same column.
In each case, I'll start by setting the top yaxis to use a log-base-2 scale.
In the left column, I then call cla() on the top axis.
In the right column, I then call cla() on the bottom axis.
In every case, the top-left text indicates the scale and formatter used by that axis before the call to cla(), the top-right text indicates the scale and formatter used after the call to cla().
In column 1, the call to cla() on the top axis reset both the scale to linear and the formatter to the default formatter. On the bottom axis, the scale was not reset, but the formatter was.
In column 2, the call to cla() on the bottom axis reset the formatter to the default formatter, but did set the scale to log10(!). The top axis had its scale kept and its formatter reset (similarly to column 1 bottom).
I'm not sure what the correct behavior should be but it's likely not the current one.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
github-actions commented on May 22, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
anntzer commented on May 22, 2023
For reference purposes this is now spelled
(basey renamed to base).
A small improvement: the bottom left axes now uses log2, not log10.
The other issues are still present.
anntzer commented on Sep 24, 2024
Superseded by #23503 (looks like I keep rediscovering the issue...)