I want to update a plot in real time. I did some goog search, and saw various
answers. Trouble is, they aren't working.
Here's a typical example:
import matplotlib.pyplot as plt
import numpy as np
fig=plt.figure()
plt.axis([0,1000,0,1])
i=0
x=list()
y=list()
while i 1000:
Dear all,
I searched the internet but still get confused by how can I save a figure
with high dpi value to jpeg format.
I am using matplotlib 1.2.0 with ubuntu system.
In [14]: mat.__version__
Out[14]: '1.2.0'
I tried both setting the flag savefig.dpi flag in matplotlibrc as 300,
and use
Dear Neal,
2013/3/11 Neal Becker ndbeck...@gmail.com
I want to update a plot in real time. I did some goog search, and saw
various
answers. Trouble is, they aren't working.
Here's a typical example:
import matplotlib.pyplot as plt
import numpy as np
fig=plt.figure()
Tried with/and without plt.ion(), no difference. Nothing is drawn. When I
kill it with C-c, briefly a window is flashed.
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.ion()
import numpy as np
fig=plt.figure()
plt.axis([0,1000,0,1])
i=0
x=list()
y=list()
while i 1000:
mpl is 1.2.0
Fedora linux
On Mon, Mar 11, 2013 at 9:57 AM, Neal Becker ndbeck...@gmail.com wrote:
Tried with/and without plt.ion(), no difference. Nothing is drawn. When
I kill it with C-c, briefly a window is flashed.
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.ion()
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
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
QWidget, the basic component of a Qt4
I added fig.canvas.show(). It still does nothing.
If I add
mpl.use ('GTK'), now it seems to be doing realtime plotting.
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.ion()
import numpy as np
fig=plt.figure()
plt.axis([0,1000,0,1])
i=0
x=list()
y=list()
fig.canvas.show()
while i
According to other examples I see on the web, use of 'relim' and
'autoscale_view' should result in rescaling and drawing new axes. Doesn't.
Unless I explicity call
ax.axis ([...])
I don't get any rescaling.
Here's an example:
import matplotlib as mpl
mpl.use ('GTK')
import matplotlib.pyplot
Neal,
You might try
mpl.use('GTKAgg')
as I have seen problems with lone GTK. Also you might change this in your
.matplotlibrc file if possible.
-Sterling
On Mar 11, 2013, at 10:43AM, Neal Becker wrote:
According to other examples I see on the web, use of 'relim' and
'autoscale_view'
Doesn't matter, still doesn't rescale without calling ax.axis
On Mon, Mar 11, 2013 at 1:48 PM, Sterling Smith smit...@fusion.gat.comwrote:
Neal,
You might try
mpl.use('GTKAgg')
as I have seen problems with lone GTK. Also you might change this in your
.matplotlibrc file if possible.
Someone may have to correct me, but I think this has to do with the Qt4
event loop and it not being run properly. When you get into real time
plotting it can get kind of tricky. In your case (I got the same
results). I have made real-time PyQt4 GUIs before and have always used
separate
I go through a compute loop that takes maybe a few seconds per pass, then
plot a new point on the graph. Do I have to? No - I thought mpl was
supposed to do this and wanted to learn how. If it really doesn't work
I'll do something else.
I don't think animation is correct here - I had the
I agree, I don't think that will work with mpl's animation stuff or at
least I wouldn't want to do it that way. I've created GUIs that received
data from a weather instrument in real-time. I did method 3 that I
mentioned before because I knew the scientists using it were going to
want more and
Hi,
Some time ago I tried to upgrade from an old version of mpl 0.99 to 1.0
but couldn't get it to work with py2exe and running on a Athlon PC.
I finally got around to upgrade things and have another go at this.
I am now on:
Python 2.7
Numpy 1.6.1 /arch nosse
mpl 1.2.0
I see a hard crash on
I'm 64-bit Windows 7 with matplotlib 1.2.0 and WxPython 2.8.12.1. I
was fiddling around with some of the different backends to see what
they look like and I found that the WxAgg backend doesn't work:
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit
(AMD64)] on win
32
I have an issue with basemap.imshow() at higher latitudes - namely the
image (high-res topography, in this case) becomes distorted with
respect to the coastlines the higher I go.I assume it has to do
with the image pixels becoming more non-square the higher I go in
latitude.
I found this
On 3/11/2013 1:59 PM, Neal Becker wrote:
I go through a compute loop that takes maybe a few seconds per pass, then
plot a new point on the graph.
If you are willing to use TkAgg, see the TSPlot class here:
https://econpy.googlecode.com/svn-history/r175/trunk/abm/gridworld/gridworld.py
Alan
Hi, everyone.
I think I found a couple of bugs, but maybe someone knows something
about this before I go filing a bug report.
Matplotlib version: 1.1.1rc
Bug 1: I'm using axis.twiny() to plot two data sets on top of each other
using a shared y-axis. If the values are large, an exponent
Dear experts,
Is there a way to get back to the prompt after a plot is made and displayed
with out closing the plot?
The objective is to compare to plots or check some aspect about the plot made
from the loaded variables. This is the standardĀ behaviorĀ of matlab after
plotting we get the prompt
20 matches
Mail list logo