-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Removes OldScalarFormatter #7956 #8295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes OldScalarFormatter #7956 #8295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there's no longer an 'old' or 'new' method, could you rename the file to just scalarformatter_demo.py
?
I am sorry… Could you rename the file to plot_scalarformatter.py? We are currently migrating to sphinx-gallery, and it is possible that we will have to rename everything to plot_XX, so better renaming once than several times :) |
@NelleV should it be plot_scalarformatter.py or plot_scalarformatter_demo.py? |
This looks good to me. I am going to make a couple of additional suggestions, but feel free to ignore those:
Thanks a lot for your contribution! |
@NelleV : I have tried to add a description let me know if this is ok or if futher improvment is needed.
Thanks |
@NinadBhat it's one of the category of our gallery. You can switch galleries by switching the folder in which the example lies. Right now, the example is in the folder examples/pylab_examples. To switch it to the ticks and spines category, just move the file in examples/ticks_and_spines. |
from matplotlib.ticker import OldScalarFormatter, ScalarFormatter | ||
""" | ||
=========================== | ||
Example For ScalerFromatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a small typo here: (ScalerFromatter -> ScalerFormatter).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tick formatting using the ScalerFormatter" may be a better title?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And Scalar, not Scaler.
ax2.plot(x * 1e5, x * 1e-4) | ||
ax2.xaxis.set_major_formatter(OldScalarFormatter()) | ||
ax2.yaxis.set_major_formatter(OldScalarFormatter()) | ||
The example shows use of ScalerFormater with different settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another type here: ScalerFormater -> ScalerFormatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too "Scalar"
@NelleV and @dopplershift sorry for the typos. I have made changes and moved the file to examples/ticks_and_spines. |
from matplotlib.ticker import OldScalarFormatter, ScalarFormatter | ||
""" | ||
========================================= | ||
Tick formatting using the ScalarFromatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still a typo here (that I am fine fixing just before merging).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@@ -205,7 +205,7 @@ | |||
'multiline.py', | |||
'multiple_figs_demo.py', | |||
'nan_test.py', | |||
'newscalarformatter_demo.py', | |||
'plot_scalarformatter.py', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NelleV: This should go to files['ticks_and_spines'] right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood properly from a conversation with @tacaswell, this file is way out of date and unmaintained.
@tacaswell can you confirm or correct this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you're thinking of #8069?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I think of a later discussion (last week or so)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once #8069 goes through all these explicit example file references will be gone anyway, so I don't think this matters.
#7956
http://matplotlib.org/examples/pylab_examples/newscalarformatter_demo.html: drop OldScalarFormatter (which should probably be deprecated anyways...)