Discussion:
[Matplotlib-users] accessing axis artist objects for an axes object
Benjamin Root
2016-09-07 17:05:23 UTC
Permalink
... or report it as a bug against Cartopy for not observing the pad rcParam?
It turns out that the Cartopy gridline labels are NOT tick labels, but
Text objects managed by the Gridliner class. I think I'm just going
to draw the grid line labels myself.
Hmm, strange. Well, I know this works in mplot3d (we have a test for it)
tick.set_pad(tick.get_pad() - i * 5)
A bit silly, but it is how you can have labels anywhere you want
relative to
the ticks.
I couldn't find an rcParams property called "tickpad". I did find
"xtick.major.pad", which was set to 4.0. Setting it to a negative
value has no effect. xtick.minor.pad doesn't do anything either.
I think you do that by setting a negative tickpad value in the
rcParams.
Thomas - I hate to be obtuse, but did you mean to imply that the
xaxis
and yaxis properties of an Axes object are AxisArtist objects?
IPython tells me that they are XAxis and YAxis objects. From
inspecting the GitHub repo, it seems that these are child classes of
the Axis object.
I suppose I should ask the question addressing the problem I actually
have: How do I render the tick (map) labels *inside* a Cartopy map
instead of *outside*?
Thanks,
Mike
ax.xaxis or ax.yaxis
axes_grid is an alternative to the default Axes/Axis classes.
Tom
Python: 3.5
Matplotlib: 1.5.2
I'm trying to invert the tick labels on a Cartopy map, and I found
ax.axis[:].invert_ticklabel_direction()
http://matplotlib.org/mpl_toolkits/axes_grid/users/
axisartist.html
My problem is that any Axes object (or child class thereof) that
I've
experimented with says that the axis attribute is a *method*, not
a
sequence as I infer from the above example.
How do I get the axisartists for a bog-standard Axes instance?
Thanks in advance,
Mike
------------------------------------------------------------
------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------
------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...