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

DOC: fix description of vmin/vmax in scatter #16297

Merged
merged 1 commit into from Jan 23, 2020

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jan 22, 2020

PR Summary

Someone on stack overflow didn't understand what vmin/vmax were for, to which I was going to point them to the docs. However, the docs for scatter mention the "luminance" of the data, which is not really at all what vmin/vmax change. So I suggest the following changes to be a little clearer. Also its a bit strange to say vmin and vmax work with norm when their use with norm is deprecated...

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak changed the title DOC: fix desceiption of vmin/vmax in scatter DOC: fix description of vmin/vmax in scatter Jan 22, 2020
@jklymak jklymak added this to the v3.3.0 milestone Jan 22, 2020
*norm* is only used if *c* is an array of floats. If *None*, use
the default `.colors.Normalize`.
If *c* is an array of floats, *norm* is used to scale the color
data, *c*, from 0 to 1, into order to map into the colormap *cmap*.

Choose a reason for hiding this comment

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

... to scale the color data, c, to the range from 0 to 1, in order to...

luminance data. If None, the respective min and max of the color
array is used.
*vmin* and *vmax* are used in conjunction with the default norm to
map the color array (*c) to the colormap (*cmap*). If None, the

Choose a reason for hiding this comment

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

(*c*) instead of (*c)

@jklymak
Copy link
Member Author

jklymak commented Jan 23, 2020

Ooops, sorry about that. Managed to push an empty branch...

@jklymak jklymak reopened this Jan 23, 2020
luminance data. If None, the respective min and max of the color
array is used.
*vmin* and *vmax* are used in conjunction with the default norm to
map the color array (*c*) to the colormap (*cmap*). If None, the
Copy link
Contributor

@anntzer anntzer Jan 23, 2020

Choose a reason for hiding this comment

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

this actually reads fine without the parentheses too (map the color array *c* to the colormap *cmap*) -- either way is fine

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah you are right. I’ll remove or if someone want to push a change that is great.

@timhoffm timhoffm merged commit efbc555 into matplotlib:master Jan 23, 2020
@jklymak jklymak deleted the doc-rephrase-scatter-vmin branch January 23, 2020 15:36
@jklymak jklymak restored the doc-rephrase-scatter-vmin branch February 1, 2020 17:26
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.

None yet

4 participants