Re: [Matplotlib-users] Get contourf image as array

2014-10-16 Thread David Hoese
ther discussions in this mailing list about > how to use GDAL to rasterize a set of polygons (represented as paths), > including some links to stack-overflow questions. It isn't a complete > end-to-end solution, but the pieces are there. > > Cheers! > Ben Root > > > O

Re: [Matplotlib-users] Get contourf image as array

2014-10-15 Thread David Hoese
; > xcoords = paths.vertices.transpose()[0] > ycoords = paths.vertices.transpose()[1] > > you can then do whatever you wish with them. > > Joy > > > On Wed, Oct 15, 2014 at 9:11 PM, David Hoese <mailto:dho...@gmail.com>> wrote: > > I've been searchin

[Matplotlib-users] Get contourf image as array

2014-10-15 Thread David Hoese
I've been searching and reading through source code and google searches to see if this is possible, but no luck so far. I'm basically trying to map some data using Basemap, use contourf to map it to an image, and then put that image in a geotiff (or other format) for use in other GIS programs.

Re: [Matplotlib-users] real time plotting

2013-03-11 Thread David Hoese
e - I had the impression animation is where my update would be run as a callback, with a main loop that calls me periodically. Could that fit the model I described, where a lengthy computation produces a new value every few/10s of seconds? On Mon, Mar 11, 2013 at 1:55 PM, David Hoese <mai

Re: [Matplotlib-users] real time plotting

2013-03-11 Thread David Hoese
x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() On Mon, Mar 11, 2013 at 10:35 AM, David Hoese <mailto:dho...@gmail.com>> wrote: Oops forgot to change the subject line. On 3/11/13 9:34 AM, David Hoese wrote: You likely need to "s

Re: [Matplotlib-users] real time plotting

2013-03-11 Thread David Hoese
Oops forgot to change the subject line. On 3/11/13 9:34 AM, David Hoese wrote: > You likely need to "show()" the canvas. I usually do this by calling > "fig.canvas.show()" before the for loop. > Since you are using a Qt4 backend the canvas used by the figure is a &

Re: [Matplotlib-users] Matplotlib-users Digest, Vol 82, Issue 16

2013-03-11 Thread David Hoese
You likely need to "show()" the canvas. I usually do this by calling "fig.canvas.show()" before the for loop. Since you are using a Qt4 backend the canvas used by the figure is a QWidget, the basic component of a Qt4 GUI. I don't know if there is a more matplotlib specific way of doing this, but

[Matplotlib-users] importing basemap then shapely causes error

2013-02-08 Thread David Hoese
I've asked this question on GIS stack exchange site, but thought it would be good to post here too. The SE question is here: http://gis.stackexchange.com/questions/50394/importing-matplotlib-basemap-and-shapely I have a python script that uses matplotlib's basemap and another part that uses s

Re: [Matplotlib-users] matplotlib 1.1 "TypeError: a float is required" problem

2012-01-06 Thread David Hoese
uot;Qt4Agg")" I'm kind of a newbie, sorry. Ken On Sat, Jan 7, 2012 at 12:22 AM, David Hoese <mailto:dho...@gmail.com>> wrote: I experienced the same problem on the macosx backend, switched to Qt4Agg and no problems. import matplotlib matplotlib.

Re: [Matplotlib-users] matplotlib 1.1 "TypeError: a float is required" problem

2012-01-06 Thread David Hoese
I experienced the same problem on the macosx backend, switched to Qt4Agg and no problems. import matplotlib matplotlib.use("Qt4Agg") -Dave On 1/6/12 10:08 AM, md...@stsci.edu wrote: > I suspect this bug is specific to the macosx backend. Can you switch to > another backend and confir

Re: [Matplotlib-users] Blitting with qt4

2011-12-15 Thread David Hoese
ting of stuff like this works. For example, if I could better understand why your bug fix was needed. On 12/15/11 10:04 AM, David Hoese wrote: > Oops forgot to change subject. > > On 12/15/11 10:02 AM, David Hoese wrote: >> Eric, >> >> I installed mpl from git ("git

Re: [Matplotlib-users] Blitting with qt4

2011-12-15 Thread David Hoese
Oops forgot to change subject. On 12/15/11 10:02 AM, David Hoese wrote: > Eric, > > I installed mpl from git ("git clone > git://github.com/matplotlib/matplotlib.git", unless I was suppose to > use one of the branches) and same problem. I looked at my code again >

Re: [Matplotlib-users] Matplotlib-users Digest, Vol 67, Issue 23

2011-12-15 Thread David Hoese
Eric, I installed mpl from git ("git clone git://github.com/matplotlib/matplotlib.git", unless I was suppose to use one of the branches) and same problem. I looked at my code again and thought there should be a canvas.draw() before calling "c.copy_from_bbox(a.bbox)", but still the same proble

[Matplotlib-users] Blitting with qt4

2011-12-14 Thread David Hoese
Does anyone know if using the blit method from FigureCanvasQTAgg is not fully supported? I'm having a problem where I'm animating a plot using the blit method and I click on/activate the window the background of the figure disappears (axes and line stay visible). I'm not sure if this is just

Re: [Matplotlib-users] [ploting data] Live data

2011-12-14 Thread David Hoese
> > How can I call the "ApplicationWindow" class from my while loop? I'll > try to read a bit more about PyQt to understand how it works :) > > thanks again! > > Fabien > > 2011/12/14 David Hoese: >> I'm not sure how experienced you are with mu

Re: [Matplotlib-users] [ploting data] Live data

2011-12-14 Thread David Hoese
an be complex > to read and to edit. Thank you very much anyway! > > How can I write a multi-thread process? I've just tried to add > qApp.processEvents() at the end of my while loop but it doesn't change > anything... > > Thanks again, > > Fabien > > 2

Re: [Matplotlib-users] [ploting data] Live data

2011-12-13 Thread David Hoese
Yeah I didn't think about suggesting that, but I think it might get complicated. I think he would have to start a one shot timer to call a function to set the voltage. Then that function would also start another one shot timer to call another function that would read from the sample. That fu

Re: [Matplotlib-users] [ploting data] Live data

2011-12-13 Thread David Hoese
vid! Sorry about the delay I was abroad and without any way to >>> connect to the internet. >>> >>> Thank you very much. I've tried to put the principal inside the >>> timerEvent. It work but it lags. In fact I've set the interval of the >>>

Re: [Matplotlib-users] [ploting data] Live data

2011-12-12 Thread David Hoese
accurate... > > Is there a way to do the principal loop, show it on the screen, then > redo the loop? > > Thanks again! > > Fabien > > 2011/12/5 David Hoese: >> If I'm understanding your question correctly and reading your code >> correctly, you're ask

Re: [Matplotlib-users] [ploting data] Live data

2011-12-05 Thread David Hoese
If I'm understanding your question correctly and reading your code correctly, you're asking why the timer method of doing things works, but the principal() while loop method does not. I had a couple solutions that involved the main event loop, but I just noticed 2 main things that are probably

Re: [Matplotlib-users] [ploting data] Live data

2011-12-04 Thread David Hoese
I think you forget to set the layout on your central widget. self.main_widget.setLayout(vbl) # in your case -Dave On 12/4/2011 9:57 AM, matplotlib-users-requ...@lists.sourceforge.net wrote: > 2011/12/2 Daniel Hyams: >> > I don't have PyQt installed, so I couldn't test the code, but don't you >

Re: [Matplotlib-users] how would you do this (animated bargraph) (Neal Becker)

2011-09-30 Thread David Hoese
Neal, I do something similar to this where data that I'm plotting in a 2D line plot comes from a UDP socket and some memory mapped files. To accomplish the live updating I have a mix of your #2 and #3. I have a main GUI thread that displays the plots, then I have a second thread that gets da