[Matplotlib-users] Style axes for imshow only
tcaswell at gmail.com
Mon Nov 7 21:19:32 EST 2016
No, `Axes` do not know a head of time what type of artists they will host
(which is both a feature and a bug depending on who you ask).
`imshow` _does_ change some `Axes` properties (in addition to adding the
requisite artists) such as setting the aspect ratio. In principle we
could have an `image.axis.top` and friends rcParams, but then we maybe
should have them for _all_ of the 'basic' plotting methods. Not only would
this lead to a great explosion of rcParams, we would also have to deal with
conflicts / rules about how to settle conflicts (which sounds like a big
mess to me).
I suggest writting a helper function like:
def my_imshow_that_changes_axis_visibilty(ax, data, **kwargs):
# set axis visibility as you desire
return ax.imshow(data, **kwargs)
# set up the axis the way you want
On Mon, Nov 7, 2016 at 8:40 PM Juan Nunez-Iglesias <jni.soma at gmail.com>
> Is there a way to set different axis style for imshow plots using a style
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users