Hi,
I am working on a plot that requires AxisArtist and I cannot set the tick
separation (or nbins) that I want to avoid overlapping of ticklabels. I read http://www.ce.mu.edu.tr/sharedoc/python-matplotlib-doc-1.0.1/html/mpl_toolkits/axes_grid/users/axisartist.html#gridhelper,
where they suggest to use the classical set_ticks, but it doesn't work.
ax.xaxis.set_ticks() does not makes any difference, the ticks are same as
originally, and
ax.axis["left"].set_ticks() results in an error: 'AxisArtist' object has
no attribute 'set_ticks'
Can somebody help me?
Thanks in advance,
Patricia
On Feb 20, 2013, at 10:31 AM, patricia <ptrambauer@...32...> wrote:
Hi,
I am working on a plot that requires AxisArtist and I cannot set the tick
separation (or nbins) that I want to avoid overlapping of ticklabels. I read http://www.ce.mu.edu.tr/sharedoc/python-matplotlib-doc-1.0.1/html/mpl_toolkits/axes_grid/users/axisartist.html#gridhelper,
where they suggest to use the classical set_ticks, but it doesn't work.
ax.xaxis.set_ticks() does not makes any difference, the ticks are same as
originally, and
ax.axis["left"].set_ticks() results in an error: 'AxisArtist' object has
no attribute 'set_ticks'
Can somebody help me?
Thanks in advance,
Patricia
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
Dear Jody,
No, I tried it also...
ax.axis["left"].xticks() results in error: 'AxisArtist' object has no
attribute 'xticks'
ax.xticks() results in error: 'Floating AxesHostAxesSubplot' object has no
attribute 'xticks'
plt.xticks() or just xticks() does not produce any change.
Any idea?
Perhaps you could include some code that illustrates what you are trying to do? I'm confused if you are trying to do something simple and are just going about it the wrong way, or if you are doing something hard.
On Feb 20, 2013, at 11:34 AM, patricia <ptrambauer@...32...> wrote:
Dear Jody,
No, I tried it also...
ax.axis["left"].xticks() results in error: 'AxisArtist' object has no
attribute 'xticks'
ax.xticks() results in error: 'Floating AxesHostAxesSubplot' object has no
attribute 'xticks'
plt.xticks() or just xticks() does not produce any change.
Any idea?
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
Dear Jody,
This is the original code that I am using: http://old.nabble.com/Taylor-diagram-(2nd-take)-p33364690.html
It is a code that plots Taylor diagrams.
I would like to get ticks every two points in the standard deviation axis of
the Taylor diagrams to avoid overlapping of labels (as I am making a figure
with several small Taylor Diagrams subplots).
Thanks!
Patricia
Could you post a simple, self contained example that demonstrates your
problem (see http://sscce.org/).
I'd like to help you, but don't have the bandwidth to dig through all that
code.
A link to pastebin, a github gist or similar service would be preferred.
-paul
···
On Thu, Feb 21, 2013 at 1:08 AM, patricia <ptrambauer@...32...> wrote:
Dear Jody,
This is the original code that I am using: http://old.nabble.com/Taylor-diagram-(2nd-take)-p33364690.html
It is a code that plots Taylor diagrams.
I would like to get ticks every two points in the standard deviation axis
of
the Taylor diagrams to avoid overlapping of labels (as I am making a figure
with several small Taylor Diagrams subplots).
Thanks!
Patricia
AxisArtist utilizes a different (compared to the vanilla matplotlib) mechanism for determining tick location etc., so some of the matplotlib commands do not work.
Unfortunately, AxisArtist is still not well documented, and things are often opaque. Below I implemented a method that you can use to control the nbins. To manually specify the tick locations you need to use the FixedLocator.
IHTH,
-JJ
class TaylorDiagram(object):
…
def set_nbins(self, nbins):
ghelper = self._ax.get_grid_helper() # get grid_helper
ghelper.grid_finder.grid_locator2.set_params(nbins=nbins) # update the parameter of the grid_locator2 (2 means 2nd coordinate).
Helper. invalidate () # invalidate the helper so that new parameters become effective
···
On Thu, Feb 21, 2013 at 6:08 PM, patricia <ptrambauer@…32…> wrote: