Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
> should be equal to the absolute square of X, right? > > Paul > > > On 12. nov. 2012, at 21:00, G Jones wrote: > >> Hi, >> If you trace back into the code further, you will see that the Pxx is >> computed as X = fft(x), Pxx = X * conj(X) which is rea

Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
Hi, If you trace back into the code further, you will see that the Pxx is computed as X = fft(x), Pxx = X * conj(X) which is real, but the data type will be complex with a ~0 imaginary part (up to floating point precision). Thus the Pxx.real is just to ensure that the resulting data type is real in

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread G Jones
Note there is a typo. Ben assigned the output to "pts" but then referenced "res". On Thu, Feb 2, 2012 at 12:59 PM, Benjamin Root wrote: > On Thu, Feb 2, 2012 at 2:54 PM, Jim St.Cyr wrote: > >> On 2/2/2012 3:41 PM, Benjamin Root wrote: >> >> On Wed, Feb 1, 2012 at 4:07 PM, Jim St.Cyr wrote: >>

Re: [Matplotlib-users] Horizontal bar chart with log x-axis, no filled boxes

2012-01-12 Thread G Jones
I think this is because the bar is going from zero to your value, so the left edge of the rectangle becomes log(0). I see this when using the 'k' and 'l' keys to interactively put a histogram on a log scale. Passing in log=True for hist fixes this. I'm sure there's something similar that can be don

Re: [Matplotlib-users] plotting points/locations from data file

2011-04-19 Thread G Jones
(lats,lons,'*') > > #plt.plot(lons,lats,'*') > > #data = csv2rec('file2.txt',delimiter=',') > > #plot(data[:,0],data[:,1],'o') > > #data = csv2rec('file2.txt',delimiter=' ',names=['lat','lo

Re: [Matplotlib-users] plotting points/locations from data file

2011-04-19 Thread G Jones
f file to use csv2rec? > > > import sys,getopt > > from mpl_toolkits.basemap import Basemap, shiftgrid, cm > from mpl_toolkits.basemap import NetCDFFile > from pylab import * > > > > > --- On *Tue, 4/19/11, Ian Bell * wrote: > > > From: Ian Bell > Subj

Re: [Matplotlib-users] plotting points/locations from data file

2011-04-19 Thread G Jones
You may find it easier to use mlab.csv2rec or numpy.loadtxt. e.g. data = csv2rec(filename,delimiter=' ') plot(data[:,0],data[:,1],'o') On Tue, Apr 19, 2011 at 4:26 PM, Michael Rawlins wrote: > > Sorry I should have mentioned that longitudes are negative; there is a '-' > before each longitude,

[Matplotlib-users] Updating legends in dynamic plot

2010-09-06 Thread G Jones
Hello, I have a Qt4 application with dynamic embedded matplotlib plotting. The application allows the user to add and remove lines from the plot. This all works well, but I have found that updating the legend is causing a memory leak. What is the proper way to update the legend in an animated/dynam

[Matplotlib-users] Bug with pcolorfast

2009-08-13 Thread G Jones
Hello, Executing the following commands from ipython --pylab produces the error below: ax = subplot(111) ax.pcolorfast(randn(100,100)) ax.set_xlim(2000,2001) draw() I ran into the error in a more complicated script, but this seems to be a simple example to reproduce it. I notice if I instead use:

Re: [Matplotlib-users] Preferred Qt4 version with 0.98.3

2008-10-16 Thread G Jones
row down on the root cause. > > Mike > > G Jones wrote: > >> Hello, >> I'm trying to track down a segfault when a canvas.draw() call is made in >> my GUI program using the Qt4Agg backend. I am running matplotlib 0.98.3 and >> Qt 4.3.2. <http://4.3.2.>

[Matplotlib-users] Preferred Qt4 version with 0.98.3

2008-10-15 Thread G Jones
Hello, I'm trying to track down a segfault when a canvas.draw() call is made in my GUI program using the Qt4Agg backend. I am running matplotlib 0.98.3 and Qt 4.3.2. I know the Qt version is a bit old, so I wanted to check if I should be suspicious of version incompatibility. I am working on a scri

[Matplotlib-users] Axes other than pixels with imshow

2008-09-21 Thread G Jones
Hello, Is it possible to label the axes of an imshow plot with something other than pixel number? I want to use imshow for speed, but also would like to be able to put arbitrary X and Y axes vectors on, as in pcolor(x,y,z) Thanks, Glenn --

[Matplotlib-users] Xlib: extension "XInputExtension" missing on display "ubuntu.local:1.0".

2008-06-19 Thread G Jones
Hello, I am running matplotlib applications over VNC and during the initialization segment, I always see the above error. It doesn't seem to cause any problems, but I am curious what is causing it. Does anyone have an idea? This happens using the Qt4Agg backend at least. It seems to occur right whe

Re: [Matplotlib-users] Bug with blitting in Qt4Agg backend

2008-05-19 Thread G Jones
On 5/19/08, John Hunter <[EMAIL PROTECTED]> wrote: > On Mon, May 19, 2008 at 2:36 AM, G Jones <[EMAIL PROTECTED]> wrote: > > Hello, > > I am experiencing a bug when trying to blit a canvas that contains two > > axes, one with a line plot and the other with

[Matplotlib-users] Bug with blitting in Qt4Agg backend

2008-05-19 Thread G Jones
Hello, I am experiencing a bug when trying to blit a canvas that contains two axes, one with a line plot and the other with an imshow plot. The attached example, QtBlitBugDemo.py demonstrates the problem. As is, on my machine, the imshow plot updates correctly, but the line plot acts like the backg

[Matplotlib-users] hist is broken in SVN when using numpy 1.1.0.dev5077

2008-05-19 Thread G Jones
Hello, I am using r5186 from the SVN with numpy 1.1.0.dev5077. When I try hist(rand(512),arange(-128,127)) I get: --- Traceback (most recent call last) /home/gej/casper_work/backend/qtSpec/src/ in () /usr/lib/pyt

[Matplotlib-users] bug in qtagg backend when blitting

2008-05-05 Thread G Jones
Hello, Attached is a script that when run from ipython --pylab with your backend setup for 'QtAgg' reproduces a bug I am seeing. If you run the plot, you'll see a line plotted in blue as expected. Then when the same figure is updated by blitting, the line turns red. I tried this with green and it s

[Matplotlib-users] possible bug in FigureManagerQT: notify_axes_change never used

2008-05-05 Thread G Jones
Hello, I don't know if this is a bug or not, but I notice that notify_axes_change is defined in each FigureManager* __init__ function, and usually it is then passed to self.canvas.figure.add_axobserver(notify_axes_change), but this is not the case in FigureManagerQt, it is defined but never used in

[Matplotlib-users] Using the pylab figure system programmatically

2008-05-04 Thread G Jones
Hello, I did some quick tests of using pylab.figure() to create a figure window, and then accessing the canvas to do blitted animation, which is working well. I also reimplemented the resizeEvent handler to update the region to be blitted. However, I have one major problem, that when I click the X

[Matplotlib-users] when to call copy_from_bbox

2008-05-04 Thread G Jones
Hello, I am again working on an application with animated plots using the blitting method. I am using the Qt4 backend, but I had similar trouble with the wx backend. The trouble is when I first get the bbox of the plot to copy the background region, the bbox is incorrect, so the wrong region is use

[Matplotlib-users] Embedding matplotlib in Qt using Designer

2008-04-30 Thread G Jones
Hello, I have decided to switch to the QtAgg backend because the Designer software is very appealing. I succeeded in adding a custom widget representing the FigureCanvasQTAgg, but when I compile the ui file, I see that it tries to instantiate it as FigureCanvasQTAgg(Parent) where Parent is the pare

[Matplotlib-users] Developing with IPython

2008-04-28 Thread G Jones
Hello, I appologize for a slightly off topic post, but I'm sure someone here knows the answer. I like the idea of developing code interactively with IPython, but I cannot get past one hurdle. I would like to write my code in a module that I then import and instantiate classes or call functions from

Re: [Matplotlib-users] animated plot with autoscaling

2008-04-26 Thread G Jones
below. Thanks again, Glenn On 4/26/08, John Hunter <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 1:19 AM, G Jones <[EMAIL PROTECTED]> wrote: > > Hello, > > Thank you for the suggestion. However, I am refering to the > > canvas.restore_region, draw_artist, bli

Re: [Matplotlib-users] animated plot with autoscaling

2008-04-24 Thread G Jones
t; ax.autoscale_view() # reset axes limits > > ioff() > show() > > -- > > Good luck, > Matthias > > > > On Friday 25 April 2008 08:01:24 G Jones wrote: > > I

[Matplotlib-users] animated plot with autoscaling

2008-04-24 Thread G Jones
I would like to extend the animated plot paradigm to an application where I need to autoscale the vertical axis each time the plot is updated. Any suggestions as to how to do so? I assume I need to tell the axis to autoscale, then draw the axis' artist. However, I am not sure how to do these things

Re: [Matplotlib-users] Different between canvas.draw() and canvas.restore_region()??

2008-04-24 Thread G Jones
I'm confused, because I don't see any place where self.canvas.draw is called in the code1 version. Also, when I resize the figure, the background region changes, so the plot gets messed up as I have noticed before with this method. Does anyone know a good way to recapture a clean background, in par

Re: [Matplotlib-users] speeding up imshow

2008-04-15 Thread G Jones
Firing <[EMAIL PROTECTED]> wrote: > Glenn, > > What version of numpy are you using? What version of matplotlib? And what > are the dimensions of your image array? > > Eric > > > G Jones wrote: > > > Thank you for the suggestion. > > I now have the upd

Re: [Matplotlib-users] speeding up imshow

2008-04-14 Thread G Jones
Thank you for the suggestion. I now have the update time down to about 70 ms. When I run the code through the profiler, I see that each plot update requires a call to matplotlib.colors.Colormap.__call__, and each of these calls takes 52 ms, 48 ms of which is spent inside the function itself. This l

[Matplotlib-users] speeding up imshow

2008-04-10 Thread G Jones
Hello, I want to use imshow to make a real time waterfall plot. The attached code is the core of my application, and it works, but it is quite slow, around 200ms to update the plot. Is there a way to accelerate this? I have seen the blitting demos, and they work well for the line plots, but I could