Skip to content

AxesImage.set_cmap() and AxesImage.set_clim() have no effects. #2454

@lucacerone

Description

@lucacerone

Hi,
the following code doesn't work as intended:

import matplotlib as mp
import pylab as pl
im = pl.imshow(pl.rand(100,100))
im.set_cmap("gray") #has no effects!!!

The colormap however can be changed using

pl.set_cmap("gray") #this however requires that the image for which one wants
# to change the colormap is the active one

Similarly:

im.set_clim(vmin=0.25, vmax = 0.75) # has no effect

I am using matplotlib 1.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions