Image options #5469

Merged
merged 1 commit into from Dec 16, 2015

Conversation

Projects
None yet
4 participants
Contributor

anntzer commented Nov 12, 2015

This patch allows the user to interactively set an image's colormap from the "axes and lines (and now images) parameters editor" (in the Qt backend).

Colormaps are listed from those registered with matplotlib.cm. Colorbars seem to be handled properly.

Note: this patch builds onto my previous PR, #5342 (also involving the options editor). If #5342 gets rejected I will split out the specifics of this PR.

Owner

tacaswell commented Nov 24, 2015

👍 This now needs a re-base due to merging #5342

Only suggestion would be to filter out the *_r colormaps and add a 'reverse' check box.

Contributor

anntzer commented Nov 24, 2015

Is there a generic way to get the reverse of a colormap? The current colormap could be a user-defined one, in which case it needs to be available in the combobox, but then the user may pick to use its reversed form instead, in which case I need to generate that colormap on the fly.
It does seem to be a good idea though.

Owner

tacaswell commented Nov 26, 2015

There was some discussion of adding such a method, but I don't think it went anywhere. In cm.py there are functions that are used to reverse the specifications (and are how we generate the *_r color maps, but I do not know if they can be made to work on a generic color map.

If the checkbox is going to take more than 15min, I would say skip it for this PR.

Contributor

anntzer commented Nov 26, 2015

I'd say it will :-) (specifically for this part, the rest is not that hard)

Contributor

anntzer commented Dec 15, 2015

Kindly bumping the issue. (If there's no easy way to reverse a cmap I'll skip that functionality for now.)

Owner

mdboom commented Dec 16, 2015

Seems fine, but this needs a rebase on current master.

Contributor

anntzer commented Dec 16, 2015

Done (with no rebase conflict).

@anntzer anntzer Set image cmap from figure options.
This patch allows the user to interactively set an image's colormap from the
axes and lines (and now images) parameters editor (in the Qt backend).

Colormaps are listed from those registered with matplotlib.cm.  Colorbars seem
to be handled properly.
e45e946

@mdboom mdboom added a commit that referenced this pull request Dec 16, 2015

@mdboom mdboom Merge pull request #5469 from anntzer/image-options
Image options
590f042

@mdboom mdboom merged commit 590f042 into matplotlib:master Dec 16, 2015

1 of 3 checks passed

coverage/coveralls Coverage decreased (-0.04%) to 68.284%
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

mdboom removed the needs_revision label Dec 16, 2015

anntzer deleted the anntzer:image-options branch Dec 16, 2015

QuLogic added the GUI/Qt label Jul 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment