|
From: Francesco M. <fra...@gm...> - 2012-09-13 20:32:50
|
Hi Daniel,
2012/9/13 Daniel Welling <dan...@gm...>
>
> Greetings, all.
>
> I have an issue: I have several axes stacked in a column with a common time vector on each x-axis. Each plot is a contour, so overplotting is not an option. In a perfect world, I want the following:
> 1) The subplots are tightly spaced such that with ax.grid() activated, the grid lines appear continuous. This makes comparing simultaneous characteristics between subplots very easy.
> 2) The subplots are linked via the "sharex" keyword so I can move them all in unison.
> 3) Only the bottommost subplot has x tick labels; on other plots, the long time-formatted labels stick out of the left and right of the plots.
>
> Items 2 and 3 are contradictory: if I turn off tick labels (e.g. ax.set_xticklabels('')) on one axes, the others turn off as well, including the bottom axes. That is bad.
> Does anyone know of a good workaround for this?
To obtain what you want you have to set the tick labels invisible is
the axes where you don't want them to show up.
>From http://matplotlib.org/examples/pylab_examples/shared_axis_demo.html:
setp( ax.get_xticklabels(), visible=False)
As the axis are shared, the ticklabels are also shared, so setting
them to "", erase them from all the axes.
I hope that this helps.
Cheers,
Francesco
>
> Thanks for your help.
>
> -dw
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|