2

I'm doing some image processing in which I have to call imshow() often. However, the default colormap and attributes don't work for me so I have to do:

gray()
imshow(myImage, interpolation='none', origin='lower')

How to set the value of imshow to have default interpolation='none', origin='lower' so it could be called just with imshow(myImage)?

1 Answer 1

6

The trick is that the atributes of imshow() are actually atributes of the matplotlib.image. And can be set it matplotlibrc in the image part.

Or dynamically with

import matplotlib as mpl
mpl.rc('image', interpolation='none', origin='lower', cmap = 'gray')

Reference from here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.