Skip to content
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

MAINT: Change spectral to nipy_spectral, update docs, leave aliases #1127

Merged
merged 3 commits into from Mar 23, 2013

Conversation

endolith
Copy link
Contributor

For #879, rename spectral to nipy_spectral (to distinguish from Spectral). Leave spectral as an alias, and spectral() as a shortcut, but only in footnotes.

@endolith
Copy link
Contributor Author

Check my docstring formatting. I used

:func:`spectral`

and

 `set_cmap('nipy_spectral')`

for instance. not sure if that's right for functions

@WeatherGod
Copy link
Member

I think you need double backquotes for the set_cmap call example, but that is completely from memory.

@@ -342,7 +343,7 @@ def gfunc32(x):
'green': ((0., 0., 0.),(1.0, 1.0, 1.0)),
'blue': ((0., 1., 1.),(1.0, 0.5, 0.5))}

_spectral_data = {'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667),
_nipy_spectral_data = {'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667),
(0.10, 0.5333, 0.5333), (0.15, 0.0, 0.0),
(0.20, 0.0, 0.0), (0.25, 0.0, 0.0),
(0.30, 0.0, 0.0), (0.35, 0.0, 0.0),
Copy link
Member

Choose a reason for hiding this comment

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

I know it's only aesthetic, but it wouldn't hurt to have all the data line up nicely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I was thinking of refactoring the datad assignments into a single dictionary too. These sorts of OCD formatting are welcome? :)

Copy link
Member

Choose a reason for hiding this comment

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

Personally, if it makes the code more readable then that's preferred. Ideally, @WeatherGod will weigh in with his PEP8 ninja chops :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well PEP8 says not to align code for readability, but I think common usage disagrees. http://www.python.org/dev/peps/pep-0008/#pet-peeves

@endolith
Copy link
Contributor Author

endolith commented Mar 9, 2013

anything else that needs to be done here?

@pelson
Copy link
Member

pelson commented Mar 11, 2013

@NelleV - your feedback on this would be highly valuable if you have a moment?

@NelleV
Copy link
Member

NelleV commented Mar 11, 2013

LGTM 👍

dmcdougall added a commit that referenced this pull request Mar 23, 2013
Change spectral to nipy_spectral, update docs, leave aliases
@dmcdougall dmcdougall merged commit b79b55d into matplotlib:master Mar 23, 2013
@endolith endolith deleted the patch-9 branch March 23, 2013 05:59
@endolith endolith changed the title Change spectral to nipy_spectral, update docs, leave aliases MAINT: Change spectral to nipy_spectral, update docs, leave aliases May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants