On Fri, Sep 25, 2009 at 6:52 AM, John Hunter <jdh2...@gmail.com> wrote:
> On Thu, Sep 24, 2009 at 3:29 PM, Gökhan Sever <gokhanse...@gmail.com>
> wrote:
> > Hello,
> >
> > One easy one harder two questions :)
> >
> > My screenshot http://img213.imageshack.us/img213/3443/snapshot5.png
> >
> > 1-) I want to link bottom and top x axes as well as left and right y
> axes.
> > For now on the x-axis xticks are the time in seconds from midnight, not
> sure
> > how to add the secondary top x axis with time in regular HH:MM:SS
> > representation, without plotting the same data again. Right y-axis is
> there
> > thanks to twinx however that and left one don't snap each other when I
> zoom
> > in the plot. There is the twin function but couldn't figure out how to
> > achieve what I explained here.
> >
>
> You might be able to manually add text for the upper tick labels, as
> in this example:
>
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo2.html
>
> JDH
>
Hi John,
Allright, previously I was blocking the plotting event while trying to
update ticks instead of ticklabels. Hah trying to use 8103 ticks kills the
action :)
After looking at that example I brought parx = host.twiny() into the game.
Now when I do parx.xaxis.set_ticklabels(dccn.hms) I only get 5 wrong
ticklabels. If I do a simple plot(dccn.hms) ticklabels are properly set. I
know a few additional steps needed to make this work, but couldn't manage to
solve this yet.
On your suggested example try zooming into the plot, bottom and top x-axes
behave differently. JJ suggested to use xlim_changed and ylim_changed event
connection but how ? :)
One more question;
Say simply when I do: parx.xaxis.set_ticks(arange(10)), and later query:
I[30]: parx.xaxis.get_majorticklocs()
O[30]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
whereas
I[31]: parx.xaxis.get_majorticklabels()
O[31]: <a list of 10 Text major ticklabel objects>
I get objects here. Is there a way to see their actual values, besides the
object representation like in get_majorticklocs() method?
Thank you.
--
Gökhan
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users