On Thu, Nov 18, 2010 at 12:59 PM, C M <cmpyt...@gmail.com> wrote: > Goals: date plot with two y axes (plotting completely different things) > point picking and point labeling > As many lines as user wants, all colored differently. > > Having some problems with this. (matplotlib 0.98.5) > > 1) There is a known bug with twinx() and plot_date: > > http://sourceforge.net/tracker/index.php?func=detail&aid=3046812&group_id=80706&atid=560720 > > But I can get it to work if I change ONE OF the plot_date() calls (the > one for the values plotted to the right-hand y axis) to just plot(). > > Is that going to introduce problems? Is there a better workaround? > (The ones on that page don't work for me).
So far, so good with this. But for others working on it, I have found that the *order* of plotting matters. That is, I have two axes and I have to use plot() for one axis and plot_date() for the other, but it must be plot() that is used first or else I will get the error: ValueError: ordinal must be >= 1. I'm managing my lines and grouping them by axes, and then making sure I plot all the lines on the axis that uses plot() first. Seems to work fine after that. > 3) My point picking is not working with the two axes. In my routine, > I label the picked point and to do that I have to make reference to > its axis and call plot_date(). How can I know which axis the picked > point came from, so that I can label it appropriately? I should have just thought about that more. Of course, there is the method myline.get_axes() for that. Che ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users