Skip to content

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

Merged
merged 6 commits into from
Mar 17, 2017
Merged

Removes OldScalarFormatter #7956 #8295

merged 6 commits into from
Mar 17, 2017

Conversation

NinadBhat
Copy link
Contributor

#7956
http://matplotlib.org/examples/pylab_examples/newscalarformatter_demo.html: drop OldScalarFormatter (which should probably be deprecated anyways...)

Copy link
Member

@dstansby dstansby left a 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?

@dstansby dstansby added this to the 2.0.1 (next bug fix release) milestone Mar 14, 2017
@NelleV
Copy link
Member

NelleV commented Mar 14, 2017

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 :)

@NinadBhat
Copy link
Contributor Author

NinadBhat commented Mar 14, 2017

@NelleV should it be plot_scalarformatter.py or plot_scalarformatter_demo.py?

@NelleV
Copy link
Member

NelleV commented Mar 14, 2017

This looks good to me. I am going to make a couple of additional suggestions, but feel free to ignore those:

  • Can you add a docstring and a title to this example, describing what the example shows? I can't say this is a great example, but here is an example of a docstring that describes what the example does: https://github.com/matplotlib/matplotlib/blob/master/examples/ticks_and_spines/plot_spines_bounds.py
  • If you do add a docstring and a title, I think this example could fit in our "ticks and spines" category. Do not move it if you don't fullfill the first point, as this is going to break the migration to sphinx-gallery PR.

Thanks a lot for your contribution!

@NinadBhat
Copy link
Contributor Author

@NelleV : I have tried to add a description let me know if this is ok or if futher improvment is needed.

  1. I don't know what "ticks and spines" category is. Can you kindly explain?

Thanks

@NelleV
Copy link
Member

NelleV commented Mar 14, 2017

@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
Copy link
Member

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).

Copy link
Member

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?

Copy link
Member

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.
Copy link
Member

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too "Scalar"

@NinadBhat
Copy link
Contributor Author

@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
Copy link
Member

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).

Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@NelleV NelleV changed the title Removes OldScalarFormatter #7956 [MRG+1] Removes OldScalarFormatter #7956 Mar 16, 2017
@@ -205,7 +205,7 @@
'multiline.py',
'multiple_figs_demo.py',
'nan_test.py',
'newscalarformatter_demo.py',
'plot_scalarformatter.py',
Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

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)

Copy link
Member

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.

@dstansby dstansby changed the title [MRG+1] Removes OldScalarFormatter #7956 [MRG+2] Removes OldScalarFormatter #7956 Mar 17, 2017
@NelleV NelleV merged commit 7a152d8 into matplotlib:master Mar 17, 2017
@QuLogic QuLogic modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Mar 17, 2017
@QuLogic QuLogic changed the title [MRG+2] Removes OldScalarFormatter #7956 Removes OldScalarFormatter #7956 Mar 17, 2017
saraedum added a commit to saraedum/sage-flatsurf that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants