[Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Klonuo Umom
Please consider: plot([1, 2, 3, 4], label='line 1') twinx() plot([11, 12, 11, 14], label='line 2') legend() will draw only label for 'line 2' plot([1, 2, 3, 4], label='line 1') legend() twinx() plot([11, 12, 11, 14], label='line 2') legend() same result, as it will overwrite label 'line 1'

[Matplotlib-users] Histograms

2011-09-28 Thread Michal
Hello, I have found the following histogram example http://gnuplot.sourceforge.net/demo/histograms.4.png which was created with the following gnuplot code: http://gnuplot.sourceforge.net/demo/histograms.4.gnu and with this data set

Re: [Matplotlib-users] Histograms

2011-09-28 Thread Klonuo Umom
IMHO, when looking for basics and even more with intent to replicate some graph, it's easy to start by looking at matplotlib gallery: http://matplotlib.sourceforge.net/gallery.html and find best match. In you case:

Re: [Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Stephen George
On 28/09/2011 4:32 PM, Klonuo Umom wrote: Please consider: plot([1, 2, 3, 4], label='line 1') twinx() plot([11, 12, 11, 14], label='line 2') legend() will draw only label for 'line 2' plot([1, 2, 3, 4], label='line 1') legend() twinx() plot([11, 12, 11, 14],

Re: [Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Benjamin Root
On Wednesday, September 28, 2011, Klonuo Umom klo...@gmail.com wrote: Please consider: plot([1, 2, 3, 4], label='line 1') twinx() plot([11, 12, 11, 14], label='line 2') legend() will draw only label for 'line 2' plot([1, 2, 3, 4], label='line 1') legend() twinx() plot([11, 12, 11,

Re: [Matplotlib-users] Fw: matplotlib - fill open path inside U.S. borders + sample map

2011-09-28 Thread Jeff Whitaker
On 9/27/11 5:37 PM, Jeff Whitaker wrote: On 9/27/11 4:57 PM, Isidora wrote: The attached map shows plotted fill paths whose filling extends only to the U.S. borders. Is there any way I could accomplish something like it using Basemap? Thanks Isidora: It's probably possible, but there's no

Re: [Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Jae-Joon Lee
On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom klo...@gmail.com wrote: How to deal with this, without manually positioning legends and if possible including all annotated plot lines in one legend? *twinx* creates a new axes. Thus there are TWO axes, and you need to do some manual adjustment. I

Re: [Matplotlib-users] Fw: matplotlib - fill open path inside U.S. borders + sample map

2011-09-28 Thread Filipe Pires Alvarenga Fernandes
Hi Isidora, in the past I used the matlab function below for a similar task. Maybe it can be adapted to your problem. If you can provide a small sample of your problem I can try to implement that in python (it has been in my TODO list for a while, but i cannot promise.)

Re: [Matplotlib-users] PDF/SVG Backends Don't Save FigureImages

2011-09-28 Thread Dave Hirschfeld
Michael Droettboom mdroe@... writes: the PDF image :/ Can you send the PDF file to me (off-list)? It would be helpful to look at the content of the file and see the nature of the failure. Mike Done! Let me know if it doesn't arrive... -Dave

[Matplotlib-users] matplotlib - fill open path inside U.S. borders + sample map

2011-09-28 Thread Isidora
Hi Filipe, I have just seen your answers. I am trying to plot on a background GIF map, lines like the ones you can see in http://www.spc.noaa.gov/products/outlook/day1probotlk_2000_wind.gif. I can plot the lines as you see them in this link without a problem. However, because those lines

Re: [Matplotlib-users] matplotlib - fill open path inside U.S. borders + sample map

2011-09-28 Thread Jeff Whitaker
On 9/28/11 2:19 PM, Isidora wrote: Hi Filipe, I have just seen your answers. I am trying to plot on a background GIF map, lines like the ones you can see in http://www.spc.noaa.gov/products/outlook/day1probotlk_2000_wind.gif. I can plot the lines as you see them in this link without a

Re: [Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Klonuo Umom
Thanks Stephen, but I'm not sure if I follow correctly: I used `twinx()` as I wanted line 1 to be referenced on left Y-axis and line 2 on right Y-axis. In your example I can't see what's the purpose of twinx() command? - It presents left Y-axis as default 0 to 1 values not referenced to any plot.

Re: [Matplotlib-users] Using labels with twinx()

2011-09-28 Thread Klonuo Umom
Thanks JJ, `axes_grid1` seems to handle this issue On Wed, Sep 28, 2011 at 4:01 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom klo...@gmail.com wrote: How to deal with this, without manually positioning legends and if possible including all

Re: [Matplotlib-users] Histograms

2011-09-28 Thread Michal
Thank you for the links, but I had trouble to get them running with Matplotlib 1.0.1. However, I downloaded the source code from the Matplotlib book ( http://www.packtpub.com/support?nid=4110 ) and in chapter 9 is an example (7900_09_04_cvs.py) with work with csv files. I have tried to modify the