Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread gsal
Great, thank you very much...that did the trick. I don't know why broken_barh does not come in the legend, either; maybe is because of the ambiguity as to which color to use in the legend...a single broken barh command can have several bars with different colors. gsal -- View this message in

Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread Paul Hobson
[Forgot to reply-all, sorry for the dup, gsal] On Fri, Jan 4, 2013 at 1:22 PM, gsal wrote: > can you provide an example? The reference help is only two lines! > > Given: > [code] > import numpy as np > import matplotlib.pyplot as plt > > fig = plt.figure() > ax = fig.add_subplot(111) > ax.broken

Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread gsal
can you provide an example? The reference help is only two lines! Given: [code] import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.broken_barh([ (110, 30), (150, 10) ] , (10, 9), facecolors='b', label='barh') ax.set_xlim((0,200)) ax.set_ylim((0,5

Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread Paul Hobson
On Fri, Jan 4, 2013 at 8:41 AM, gsal wrote: > So, it looks like broken_barh's do not show up on the legend...is there > work > around for this? > > Or, > > Is there a way to fake a legend? A way to set legend to whatever I want? > > Thanks, > > gsal > > To fake a legend, try using so-called proxy

Re: [Matplotlib-users] Synching sub-plots

2013-01-04 Thread gsal
Maybe you can use the zoom example and the binding method idea so that when you click on some point in the main graph, the zooming graph updates and plots from -50 to +50 days from the point that you clicked on the main graph.

Re: [Matplotlib-users] Persisting navigation toolbar configuration / settings

2013-01-04 Thread gsal
Hhhmmm...I am thinking to may have to implement some interactivity (callbacks) to your plot and be able to, say, click or right click and demand that the current settings be stored or restored from choices previously stored...but this has to be all your doing. -- View this message in context: h

[Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread gsal
So, it looks like broken_barh's do not show up on the legend...is there work around for this? Or, Is there a way to fake a legend? A way to set legend to whatever I want? Thanks, gsal -- View this message in context: http://matplotlib.1069221.n5.nabble.com/legend-on-a-plot-with-broken-barh

Re: [Matplotlib-users] subplots [xy]labels

2013-01-04 Thread giacomo . boffi
Alex Goodman writes: > Try using the set_ylabel() and set_xlabel() methods for each Axes instance > instead, eg: > > a[0].set_ylabel('f1') > ... works as intended, tx Alex -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Kno

Re: [Matplotlib-users] subplots [xy]labels

2013-01-04 Thread Alex Goodman
Hi Giacomo, Try using the set_ylabel() and set_xlabel() methods for each Axes instance instead, eg: a[0].set_ylabel('f1') a[0].set_xlabel('t') a[1].set_ylabel('f2') a[1].set_xlabel('t') On Fri, Jan 4, 2013 at 5:44 AM, wrote: > two plots in a figure: >

[Matplotlib-users] subplots [xy]labels

2013-01-04 Thread giacomo . boffi
two plots in a figure: from pylab import * ... f,a = subplots(nrows=2, sharex=False, sharey=False) a[0].plot(x,f0(x)) ylabel('f1') xlabel('t') ... a[1].plot(x,f1(x)) ylabel('f2') xlabel('t') ... show()