Skip to content

Add note about hist2d resetting axis limits #11071

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 2 commits into from
Apr 18, 2018

Conversation

dstansby
Copy link
Member

Maybe fixes #3815? I've also added a couple of other bits of markup to make the docstring nicer in general.

@dstansby dstansby added this to the v2.2-doc milestone Apr 17, 2018
@@ -6510,31 +6510,33 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
Other Parameters
----------------
cmap : Colormap or str, optional
A :class:`matplotlib.colors.Colormap` instance. If not set, use rc
A :class:`.colors.Colormap` instance. If not set, use rc
Copy link
Member

Choose a reason for hiding this comment

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

Since we are using 'obj' as the default role, :class: should now be left out for improved readability.

settings.

norm : Normalize, optional
A :class:`matplotlib.colors.Normalize` instance is used to
A :class:`.colors.Normalize` instance is used to
Copy link
Member

Choose a reason for hiding this comment

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

:class:

scale luminance data to ``[0, 1]``. If not set, defaults to
``Normalize()``.
:class:`.colors.Normalize()`.
Copy link
Member

Choose a reason for hiding this comment

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

:class:


vmin/vmax : None or scalar, optional
Arguments passed to the `Normalize` instance.
Arguments passed to the :class:`~.colors.Normalize` instance.
Copy link
Member

Choose a reason for hiding this comment

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

:class:

- Currently ``hist2d`` calculates it's own axis limits, and any limits
previously set are ignored.
- Rendering the histogram with a logarithmic color scale is
accomplished by passing a :class:`.colors.LogNorm` instance to
Copy link
Member

Choose a reason for hiding this comment

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

:class:

accomplished by passing a :class:`.colors.LogNorm` instance to
the *norm* keyword argument. Likewise, power-law normalization
(similar in effect to gamma correction) can be accomplished with
:class:`.colors.PowerNorm`.
Copy link
Member

Choose a reason for hiding this comment

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

:class:

@phobson phobson merged commit ff8cc81 into matplotlib:master Apr 18, 2018
@lumberbot-app
Copy link

lumberbot-app bot commented Apr 18, 2018

There seem to be a conflict, please backport manually

@phobson
Copy link
Member

phobson commented Apr 18, 2018

@meeseeksdev backport to v2.2.2-doc

@lumberbot-app
Copy link

lumberbot-app bot commented Apr 18, 2018

There seem to be a conflict, please backport manually

@QuLogic
Copy link
Member

QuLogic commented Apr 18, 2018

.py files should not be backported to that branch.

@dstansby dstansby deleted the hist-scaling branch April 18, 2018 09:20
@dstansby
Copy link
Member Author

Huh, but lots of .py stuff has been backported (e.g. #11046)?

@tacaswell tacaswell modified the milestones: v2.2-doc, v2.2.3 Jun 22, 2018
@tacaswell
Copy link
Member

@meeseeksdev backport to v2.2.x

@dstansby That was a mistake, I will back that out.

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 22, 2018

There seem to be a conflict, please backport manually

tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Aug 4, 2018
Add note about hist2d resetting axis limits

Conflicts:
	lib/matplotlib/axes/_axes.py
          - kept master branch version of docstrings
@tacaswell
Copy link
Member

backported to v2.2.x as 636a06d

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.

hist2d and x/y limits
5 participants