Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Ryan May
On Sun, Jan 3, 2010 at 1:02 AM, Phillip M. Feldman pfeld...@verizon.net wrote: Ah.  It sounds as though one must consider the scale of the map, and then choose these offsets so that the text falls near but not too near the marker.  It would be great if one could specify the text offsets in

Re: [Matplotlib-users] eps/pdf/svg contourf contours don't overlap properly with high resolution data

2010-01-03 Thread Jordan Dawe
Jouni K. Sepp?nen wrote: Jordan Dawe jd...@eos.ubc.ca writes: Contourf plots that I output in vector format files have little triangular glitches at the contour boundaries if the contoured array is larger than about 200x200. The same files in png format are perfect, even at very

[Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Alexander Hupfer
Hi, I have a scatter plot embedded in qt4 according to http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.htmlwhat works fine However if I try to add a colorbar to it by simply calling p = scatter() colorbar(p) I get an error that says that something is outside the

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 10:22 AM, Ryan May rma...@gmail.com wrote: the marker.  It would be great if one could specify the text offsets in units of the font size rather than in units of map distance. You can do it, it just takes a bit of knowledge about how different transformations are used

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 11:34 AM, Alexander Hupfer son...@gmail.com wrote: Hi, I have a scatter plot embedded in qt4 according to http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.html what works fine However if I try to add a colorbar to it by simply calling p =

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Eric Firing
John Hunter wrote: On Sun, Jan 3, 2010 at 10:22 AM, Ryan May rma...@gmail.com wrote: the marker. It would be great if one could specify the text offsets in units of the font size rather than in units of map distance. You can do it, it just takes a bit of knowledge about how different

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 2:50 PM, Eric Firing efir...@hawaii.edu wrote: I think that allowing display units would be easy to implement (as indicated by Ryan's example), but font or physical units would be much trickier because they would involve draw-time determinations.  Starting by allowing

Re: [Matplotlib-users] dividing up subplots?

2010-01-03 Thread per freem
thanks very much. Using expand_subplot for that purpose worked great, but I am now trying a variant of this and am having trouble getting it to work. I'd like to create a subplot that has two parts: the left part is a square plot, and the right part is a 2x2 set of square subplots. Something

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Laurent Dufrechou
Hello, You are using the TK backend. Add this at the top of your script: import matplotlib matplotlib.use('QT4Agg') from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Darren Dale
On Sun, Jan 3, 2010 at 5:26 PM, Alexander Hupfer son...@gmail.com wrote: Ok, that at least fixed the tkinter error, but I still don't get a colorbar attached to my plot. (which worked fine when I didn't embedd it in a Qt application) If you are importing from pylab or pyplot in your program,

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Phillip M. Feldman
What is meant by draw time? For most purposes, I think that I'd want to specify an offset in font units (points). If offsets are specified in units of pixels, then the results would be display-dependent, and achieving display-independent results would require some additional fiddling. I

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Eric Firing
Phillip M. Feldman wrote: What is meant by draw time? When you call text(...), a Text object is created and added to a list of things (Artists) to be drawn, but no drawing occurs (unless using pyplot in interactive mode) until a draw(), show(), or savefig() command is given. That's draw

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Alexander Hupfer
Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I need to launch the drawing in another thread but don't know exactly how to do this

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Eric Firing
Alexander Hupfer wrote: Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I That's strange--a scatter plot with 1000 points

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread John Hunter
On Sun, Jan 3, 2010 at 7:02 PM, Alexander Hupfer son...@gmail.com wrote: Thanks I got it fixed. This leads to the follow up question: What is the right way to keep an application responsive while the graph is drawn? Drawing a scatter plot with 300 points seems to take a while. I guess I need

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Jae-Joon Lee
How about just extending the functionality of the annotate? I believe it should be quite straight forward since annotate already support offset points. And points in matplotlib is dpi independent. However, I think calling annotate for an offset text is a bit inconvenient for now. annotate(Test,