SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(5)
2
(24)
3
(2)
4
5
(4)
6
(1)
7
(22)
8
(9)
9
(23)
10
(6)
11
12
(7)
13
(17)
14
(12)
15
(10)
16
(22)
17
(11)
18
(6)
19
(11)
20
(13)
21
(10)
22
(7)
23
(7)
24
(5)
25
(3)
26
(20)
27
(17)
28
(25)
29
(16)
30
(17)
31
(8)

Showing results of 335

<< < 1 2 3 4 5 6 .. 14 > >> (Page 4 of 14)
From: Matt B. <mat...@gm...> - 2007年03月27日 19:36:42
Having upgraded to 2.5, I get a segfault when running a very simple plot
script (test.py) at the show() function. Prior to show() I can save to file
and the result looks good. The GUI is crashing on show().
Any suggestions to fix welcome (I'm guessing many of you know the solution
to this problem).
"Annoying" debug information below:
Thanks!
-Matt
hostname:~/.matplotlib>cat test.py
from pylab import *
plot([1,2,3])
show()
hostname:~/.matplotlib>python test.py --verbose-debug-annoying -dTkAgg
matplotlib data path ..../python2.5/site-packages/matplotlib/mpl-data
$HOME=/home/username
loaded rc file /home/username/.matplotlib/matplotlibrc
matplotlib version 0.90.0
verbose.level debug-annoying
interactive is False
platform is linux2
loaded modules: ['_bisect', '_sha512', 'pylab', 'datetime', '
matplotlib.tempfile', 'distutils.sysconfig', 'encodings.encodings', 'str
uct', 'tempfile', 'pytz.os', 'zipimport', 'string', 'matplotlib.__future__',
'pytz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect'
, 'signal', 'random', 'matplotlib.pytz', 'locale', 'encodings', 'dateutil',
'matplotlib.warnings', 'pytz.pytz', 'matplotlib.sys', 're
', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 'codecs',
'md5', '_locale', 'matplotlib.os', 'thread', 'itertools', 'di
stutils.sys', 'os', '__future__', '_sre', '__builtin__', 'matplotlib.re',
'operator', 'distutils.string', 'matplotlib.datetime', 'pos
ixpath', 'errno', 'binascii', 'sre_constants', '_sha256', 'matplotlib.md5',
'types', 'pytz.sys', '_codecs', 'pytz', 'copy', '_struct'
, '_types', 'matplotlib.dateutil', 'hashlib', 'distutils', 'posix', '
encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', 'd
istutils.distutils', 'copy_reg', 'sre_compile', '_hashlib', '_random',
'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'ge
ttext', 'pytz.sets', 'stat', 'warnings', 'encodings.types', 'encodings.ascii',
'sys', 'os.path', 'pytz.gettext', 'matplotlib.distutil
s', 'distutils.errors', 'linecache', 'matplotlib.shutil', 'sets']
numerix numarray 1.5.2
font search path ['..../python2.5/site-packages/matplotlib/mpl-data']
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmtt10.ttf
trying fontname
..../python2.5/site-packages/matplotlib/mpl-data/VeraMoIt.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmex10.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBI.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBd.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmmi10.ttf
trying fontname
..../python2.5/site-packages/matplotlib/mpl-data/VeraSeBd.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmr10.ttf
trying fontname
..../python2.5/site-packages/matplotlib/mpl-data/VeraMono.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmsy10.ttf
trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf
CONFIGDIR=/home/username/.matplotlib
loaded ttfcache file /home/username/.matplotlib/ttffont.cache
backend TkAgg version 8.5
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=650.0, height=490.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg._get_agg_font
 findfont found sans-serif, normal, normal 400, normal, 12.0
findfont returning ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
Segmentation fault (core dumped)
hostname:~/.matplotlib>
From: Tyler H. <hay...@gm...> - 2007年03月27日 19:32:07
Hello All:
I have a qucik question. I like to use SciPy for many of the extra
functions it provides on top of NumPy. I also like to use matplotlib
to visualize my data.
Currently, I use the following in the majority of my Python codes:
from pylab import *
import scipy
I know that in the matplotlibrc file we can set either NUMERIC,
NUMARRAY, or NUMPY. Is it possible to set the value to SCIPY (which
loads NumPy) so I only have to load the one module? Or does this cause
clashes with other functions?
Ideally I'd like to just make the one call:
from pylab import *
Which would load SciPy (& NumPy) automatically
Cheers,
t.
-- 
Tyler Joseph Hayes
GPG Key ID# 0x3AE05130
From: Antonino I. <tri...@gm...> - 2007年03月27日 17:35:11
Hi to the list,
I'm searching to display in realtime some data read serial port. The
data is a 2D matrix and is read element wise from the serial, one
pixel each one (or more) seconds.
I'm running the script from "ipython -pylab" using the command "run
scriptname". After "loading" the script I interactively launch the
function that start the data acquisition and I would like to see the
acquired data so far. In the loop that perform the data acquisition
I'm currently calling this function to plot data:
def plot_data_in_itinere(data, **kwargs):
 global first_plot
 d = data.ravel()[find(data.ravel() > 0)]
 m = d.mean()
 vr = round(5*d.std() / m, 3)
 #clf()
 title('Scanning Data')
 xlabel('Mean Value: '+str(int(round(m)))+' -- Relative Variation: '+str(vr))
 b,t = ylim()
 ylim(t,b)
 imshow(data.astype(float),
 interpolation='nearest',
 vmin=0,
 origin='lower', **kwargs)
 if first_plot:
 colorbar()
 first_plot = False
However the call to the function is "blocking". So the acquisition
time is longer (not only I have to wait the data but I have to wait
the plot too). Furthermore, this function plot the new data above the
old one, so the plot becomes slower and slower while the acquisition
goes on. If I uncommented the cla() line, I get a plot that is blank
most of the time and that shows the data only for a fraction of second
while the new plot is performed.
Is there a way to update (or substitute) the current showed matrix
data, deleting the old plots (in the axis). I have to confess that
I've have not understand well how the pylab interactive mode works.
Ideally the plot should be performed in background, while the script
goes on and wait the next data arrival. I've tried to do this with a
simple gtk app that embeds a matplotlib plot. Hoever, I don't know how
to send the application in background. I've tried to do something like
this:
class PlotScanApp:
...
class GuiThread(threading.Thread):
 def run(self):
 gtk.main()
if __name__ == '__main__':
 stdout = sys.stdout
 a = array(randn(100)).reshape(10,10)
 p = PlotScanApp(a)
 p.start()
 print 'Start image update:'
 for i in range(10):
 sleep(1)
 stdout.write('.')
 stdout.flush()
 p.plot(array(randn(100)).reshape(10,10))
the PlotScanApp implement the gui (full files attached). Running the
script the image should be updated with random data each 1 sec. but
only the first image is showed. I suppose this is not the way to put a
gui drawing app in background...
Any hints in how to do in the right way this gtk app that when
required update the plot?
Thank a lot.
Ciao,
 ~ Antonio
From: Matthieu B. <mat...@gm...> - 2007年03月27日 15:28:54
Hi,
I tried to dig into the 3D code, and in fact, it is RegularPolyCollection
that seems to be incompatible with Axes3D. Axes3D uses _verts to create z
values, and it crashes when trying to figure out how to display it
(art3d.pylines 208-221). I don't know enough to correct it.
But I have another idea, but I suppose some had it before. In the plot,
scatter, ... code, only one colour can be used, it is tested upon, so my
question will be, why not enhancing the test to allow colors for each point
? it would be a sequence of the same size as x or y, but with rgba value, or
tuples, ...
Matthieu
P.S. : if I had more time, I would try to solve the problem, but at the
moment, I can't :(
2007年3月12日, Eric Firing <ef...@ha...>:
>
> Matthieu Brucher wrote:
> > OK, I'm trying to the same but in 3D, and there, no documentaion.
> > I tried to launch axes3d.py to see exactly what I can do, but the
> > example file does not work. For instance, Axes3D takes two parameters
> > for method __init__ and only one is provided. Did someone test it ?
> > I'm trying to use collection as well, but for once I prefer MatLab
> > simplicity here, it's way to complicated, some arguments must be zipped,
> > other are passed not in the collection, but when the collection is added
> > to the subplot, ...
> > Is there a simple and clear way to do 3D plotting with collections ?
>
> There may be, but all 3D plotting is shaky right now. The 3D code is
> essentially unmaintained and unsupported.
>
> Eric
>
From: Ryan K. <rya...@gm...> - 2007年03月27日 13:57:24
I am not running Debian and am not on a linux box right now. I can be
in a few minutes. I think we should move this to the matplotlib users
list. Someone there can help you install on Debian.
Ryan
On 3/27/07, javi markez bigara <no...@ho...> wrote:
> this is where the folder is
> /home2/diazdeim/matplotlib-0.90.0
> i want to run the setup from the terminal but i dont know how to do it
> thaks for helping
>
>
> >From: "javi markez bigara" <no...@ho...>
> >Reply-To: SciPy Users List <sci...@sc...>
> >To: sci...@sc...
> >Subject: Re: [SciPy-user] plotting with scipy
> >Date: 2007年3月27日 13:48:01 +0000
> >
> >
> >this is the python i am using, i download the mathplotlib but i think is
> >not
> >working
> >i just save it in the Desktop.. and this is the forder i get:
> >matplotlib-0.90.0
> >
> >Python 2.3.5 (#2, Sep 4 2005, 22:01:42)
> >[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
> >
> >
> > >From: "Ryan Krauss" <rya...@gm...>
> > >Reply-To: SciPy Users List <sci...@sc...>
> > >To: "SciPy Users List" <sci...@sc...>
> > >Subject: Re: [SciPy-user] plotting with scipy
> > >Date: 2007年3月27日 08:37:52 -0500
> > >
> > >What platform are you running? There should be an executable for
> > >windows that puts them in the proper directory. They can go anywhere
> > >on your PYTHONPATH, but the right answer is in the directory
> > >C:\Python24\Lib\site-packages
> > >(or I presume Python25 if you are running the current version of pytho=
n).
> > >
> > >So, I have the folders
> > >C:\Python24\Lib\site-packages\matplotlib
> > >C:\Python24\Lib\site-packages\scipy
> > >etc.
> > >
> > >On linux, you usually want to unzip the tarball and there should be a
> > >setup.py file in the top level. Then just run
> > >sudo python setup.py install
> > >(or similar if you aren't on a debian based "sudo" distribution).
> > >
> > >Let me know if you still have trouble.
> > >
> > >Ryan
> > >
> > >On 3/27/07, javi markez bigara <no...@ho...> wrote:
> > > >
> > > > thanks a lot for ur reply i will download it but the thig is that i
> >dont
> > > > know were to put it them to import it from python.....
> > > > thanks a lot Ryan
> > > > nowar
> > > >
> > > > >From: "Ryan Krauss" <rya...@gm...>
> > > > >Reply-To: SciPy Users List <sci...@sc...>
> > > > >To: "SciPy Users List" <sci...@sc...>
> > > > >Subject: Re: [SciPy-user] plotting with scipy
> > > > >Date: 2007年3月27日 07:30:48 -0500
> > > > >
> > > > >I think almost all users of scipy use matplotlib instead of scipy'=
s
> > > > >plotting capabilities. It is really a great package especially if
> >you
> > > > >only need 2D plotting. Check out matplotlib.sourceforge.net.
> > > > >
> > > > >Ryan
> > > > >
> > > > >On 3/27/07, javi markez bigara <no...@ho...> wrote:
> > > > > > hi,
> > > > > >
> > > > > > i am looking for the easy way to plot some coordinates with
> > > > > > scipy.gplt.pyPlot this is how i try it but is not working as i
> >would
> > > > >like
> > > > > > to....
> > > > > > the new list is a list of pair coordinates something like this:
> > > > > >
> > > > > > [-6.654644,65.55555]
> > > > > > [-6.645654,65.98798]
> > > > > > [-6.987813,65.28951]
> > > > > > [-6.645654,65.65987]
> > > > > > [-6.634895,65.36985]
> > > > > >
> > > > > > >>>import scipy.plt
> > > > > > >>>from scipy import gplt
> > > > > > >>>draw=3Dscipy.gplt.pyPlot.Plot()
> > > > > > >>>draw.plot(newlist)
> > > > > > >>>draw.title('little map')
> > > > > > >>>draw.xtitle('longitude')
> > > > > > >>>draw.ytitle('latitude')
> > > > > >
> > > > > > the thing is that i get in the x axes the number of list and th=
en
> > >two
> > > > >strait
> > > > > > lines
> > > > > >
> > > > > >
> > > > > > 65_________________________________
> > > > > > 50
> > > > > > 35
> > > > > > 20
> > > > > > 5
> > > > > > -10-------------------------------------------------
> > > > > > 0 1 2 3 4 5 ...........=
.
> > > > > >
> > > > > > this is wat it plots more or less
> > > > > > can anybody help me.
> > > > > > thanks in advance
> > > > > > Nowar00
> > > > > >
> > > > > > _______________________________________________________________=
__
> > > > > > Descarga gratis la Barra de Herramientas de MSN
> > > > > >
> > > >
> > >
> > >http://www.msn.es/usuario/busqueda/barra?XAPID=3D2031&DI=3D1055&SU=3Dh=
ttp%3A//www.hotmail.com&HL=3DLINKTAG1OPENINGTEXT_MSNBH
> > > > > >
> > > > > > _______________________________________________
> > > > > > SciPy-user mailing list
> > > > > > Sci...@sc...
> > > > > > http://projects.scipy.org/mailman/listinfo/scipy-user
> > > > > >
> > > > >_______________________________________________
> > > > >SciPy-user mailing list
> > > > >Sci...@sc...
> > > > >http://projects.scipy.org/mailman/listinfo/scipy-user
> > > >
> > > > _________________________________________________________________
> > > > Acepta el reto MSN Premium: Correos m=E1s divertidos con fotos y te=
xtos
> > > > incre=EDbles en MSN Premium. Desc=E1rgalo y pru=E9balo 2 meses grat=
is.
> > > >
> > >http://join.msn.com?XAPID=3D1697&DI=3D1055&HL=3DFooter_mailsenviados_c=
orreosmasdivertidos
> > > >
> > > > _______________________________________________
> > > > SciPy-user mailing list
> > > > Sci...@sc...
> > > > http://projects.scipy.org/mailman/listinfo/scipy-user
> > > >
> > >_______________________________________________
> > >SciPy-user mailing list
> > >Sci...@sc...
> > >http://projects.scipy.org/mailman/listinfo/scipy-user
> >
> >_________________________________________________________________
> >Grandes =E9xitos, superh=E9roes, imitaciones, cine y TV...
> >http://es.msn.kiwee.com/ Lo mejor para tu m=F3vil.
> >
> >_______________________________________________
> >SciPy-user mailing list
> >Sci...@sc...
> >http://projects.scipy.org/mailman/listinfo/scipy-user
>
> _________________________________________________________________
> Acepta el reto MSN Premium: Correos m=E1s divertidos con fotos y textos
> incre=EDbles en MSN Premium. Desc=E1rgalo y pru=E9balo 2 meses gratis.
> http://join.msn.com?XAPID=3D1697&DI=3D1055&HL=3DFooter_mailsenviados_corr=
eosmasdivertidos
>
> _______________________________________________
> SciPy-user mailing list
> Sci...@sc...
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
From: Nils W. <nw...@ia...> - 2007年03月27日 07:49:05
Hi all,
The script available at
http://projects.scipy.org/scipy/scipy/ticket/390
yields
True parameters: (5.0, 1.0, -5.0), Guess parameters: (4.0, 1.5, -4.0)
Optimization terminated successfully.
 Current function value: 33.309244
 Iterations: 15
 Function evaluations: 23
 Gradient evaluations: 23
Bfgs: [ 5.2463809 1.00388921 -4.71114799]
Traceback (most recent call last):
 File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 284, in expose_event
 self._render_figure(self._pixmap, w, h)
 File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 73, in _render_figure
 FigureCanvasAgg.draw(self)
 File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 392, in draw
 self.figure.draw(renderer)
 File "/usr/lib64/python2.4/site-packages/matplotlib/figure.py", line
567, in draw
 for a in self.axes: a.draw(renderer)
 File "/usr/lib64/python2.4/site-packages/matplotlib/axes.py", line
1281, in draw
 a.draw(renderer)
 File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line
208, in draw
 self._update_positions(renderer)
 File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line
570, in _update_positions
 ox, oy = self._find_best_position(w, h)
 File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line
440, in _find_best_position
 verts, bboxes, lines = self._auto_legend_data()
 File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line
357, in _auto_legend_data
 hlines = handle.get_lines()
AttributeError: LineCollection instance has no attribute 'get_lines'
Nils
From: Suresh P. <sto...@ya...> - 2007年03月27日 00:33:38
Thanks again Eric for the updated matshow().
I apologise for repeating:
Since it has been decided (has it?) that matshow will retain the feature 
that a new figure is created (with aspect ratio matching the matrix), then 
if one adds a colorbar (a typical thing to do), the matrix height is 
smaller than the colorbar, which is not visually appealing. Also, it is 
fairly common to desire combining a matrix visualisation with other plots, 
and hence the new figure becomes an issue.
Of course, I guess one could use Axes.matshow() now to avoid the above. 
If that is to be the case, fine.
One very minor thing to note: the new matshow() is missing ticks on the 
lower x-axis.
Thanks again for the excellent support for a function that clearly a lot 
of people are using.
Cheers,
Suresh
From: Eric F. <ef...@ha...> - 2007年03月26日 22:19:23
John Hunter wrote:
> On 3/26/07, Jeff Whitaker <js...@fa...> wrote:
>> John Hunter wrote:
> 
>> John: Nope, that has no effect. What does cla clean up that clf doesn't?
> 
> Well, it flushes all the lines, removes the ticks, that kind of thing.
> But fig.clear sets
> 
> self.axes = []
> 
> so if there are no references to the axes anywhere, gc.collect()
> should force a clean up and a purging of all the axes artists. Ie, it
> should matter if Axes.cla does self.lines=[] if the figure clear
> removes all references to the axes. I'm wondering if someone
> somewhere in mpl is keeping a reference to the axes....
It would have to be something like a growing list of axes, wouldn't it? 
Otherwise the old axes would be replaced by the new one on the next run 
through the loop, and it would not be a leak.
(The other leak, with interactive backends and nothing but 
pylab.figure(); pylab.close() in the loop is also keeping me baffled. 
It is not the same as the above, but it is the same sort of thing.)
Are there any python debugging tools that can show at the python level 
where memory is being used?
Eric
From: John H. <jd...@gm...> - 2007年03月26日 22:06:05
On 3/26/07, Jeff Whitaker <js...@fa...> wrote:
> John Hunter wrote:
> John: Nope, that has no effect. What does cla clean up that clf doesn't?
Well, it flushes all the lines, removes the ticks, that kind of thing.
 But fig.clear sets
self.axes = []
so if there are no references to the axes anywhere, gc.collect()
should force a clean up and a purging of all the axes artists. Ie, it
should matter if Axes.cla does self.lines=[] if the figure clear
removes all references to the axes. I'm wondering if someone
somewhere in mpl is keeping a reference to the axes....
From: Jeff W. <js...@fa...> - 2007年03月26日 21:34:22
John Hunter wrote:
> On 3/26/07, Jeff Whitaker <js...@fa...> wrote:
>
>> Jesper: For now I recommend adding 'pylab.cla()' after the fig.clear()
>> as a workaround. I don't really understand why that is necessary -
>> perhaps John or Eric can clarify whether this is indeed a bug.
>
> I suggest adding a gc.collect after the figure.clear() and see if
> this fixes things.
>
> JDH
John: Nope, that has no effect. What does cla clean up that clf doesn't?
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: John H. <jd...@gm...> - 2007年03月26日 20:12:25
On 3/26/07, Jeff Whitaker <js...@fa...> wrote:
> Jesper: For now I recommend adding 'pylab.cla()' after the fig.clear()
> as a workaround. I don't really understand why that is necessary -
> perhaps John or Eric can clarify whether this is indeed a bug.
 I suggest adding a gc.collect after the figure.clear() and see if
this fixes things.
JDH
From: John H. <jd...@gm...> - 2007年03月26日 19:56:01
On 3/26/07, lazardo <mas...@ya...> wrote:
>
> Thanks for your helpful response.
>
> I used wx, I'm mystified to as how to make the scroll bars bound the
> subplot. not the frame. The gtk example you pointed me to creates horizontal
> and vertical scrollbars around the whole frame, not within the subplot.
> i.e., if the subplot is very large , scrollbars bounding the subplot would
> be great..
This is not possible. The subplot is not a GUI widget in matplotlib,
it is part of the entire FigureCanvas, which is a widget. You can
make the Axes take up all of the figure area if you want
ax = axes([0,1,0,1])
but then you will not see you tick labels and axis labels as they will
be outside the canvas area....
JDH
From: Jeff W. <js...@fa...> - 2007年03月26日 19:49:09
Eric Firing wrote:
> Jeff Whitaker wrote:
>> Jesper Larsen wrote:
>>> Hi matplotlib users,
>>>
>>> I'm using matplotlib for a long running process. Unfortunately the 
>>> memory usage continue to grow as the process runs. I have appended a 
>>> simple example which illustrates this at the end of this mail. 
>>> Unfortunately I haven't figured out how to use the information 
>>> obtainable from gc for anything useful in this regards.
> [...]
>>> 
>> Jesper: Looks to me like the memory leak is not in Basemap, but 
>> somehow the fig.clear() is not working properly. Replacing the 
>> fig.clear() with pylab.gca() gets rid of the memory leak. I will 
>> investigate further ...
>>
>>
>> -Jeff
>>
>
> Jeff, this might be related to the leak illustrated in the attached 
> script, based on an earlier report. (I don't recall who reported it.)
>
> Eric
>
Eric: Don't think so, since Jesper's script leaks even when the backend 
is set to 'Agg' (while the one you sent doesn't).
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: lazardo <mas...@ya...> - 2007年03月26日 19:25:24
 Thanks for your helpful response.
 
 I used wx, I'm mystified to as how to make the scroll bars bound the subplot. not the frame. The gtk example you pointed me to creates horizontal and vertical scrollbars around the whole frame, not within the subplot. i.e., if the subplot is very large , scrollbars bounding the subplot would be great.. 
 
 Below is a sample of the code I attempted, let me know if I would need to make any corrections to it :
 
 import wx
 from matplotlib.axes import Subplot
 from matplotlib.figure import Figure
 from matplotlib.numerix import arange, sin, pi
 
 class ScrollbarFrame(wx.Frame):
 def __init__(self):
 wx.Frame.__init__(self, None, -1, 'Scrollbar example',size=(300,200))
 print "self"
 print self
 self.scroll = wx.ScrolledWindow(self, -1)
 print "self.scroll"
 print self.scroll
 self.figure = Figure(figsize=(5,4), dpi=100)
 self.axes = self.figure.add_subplot(111)
 t = arange(0.0,3.0,0.01)
 s = sin(2*pi*t)
 self.axes.plot(t,s)
 self.canvas = FigureCanvas(self, -1, self.figure)
 self.scroll.SetScrollbars(5,5,600,400)
 #self.scroll.FitInside()
 
 if __name__ == '__main__':
 app = wx.PySimpleApp()
 frame = ScrollbarFrame()
 frame.Show()
 app.MainLoop()
 
 Thanks,
 iyer
 
 John Hunter <jd...@gm...> wrote: On 3/19/07, lazardo wrote:
> I'm curious .. how can we include a scrollbar with a subplot, instead of the
> back and front arrows to view the subplot. Googling
> matplotlib+scrollbar+subplot brings up a very few results, so I guess it
> hasn't been attempted before.
The exact details depend on your GUI -- there is no generic support
for this in pylab but since you can embed matplotlib in the GUI widget
of your choice it is certainly possible. Below is a gtk example
embedding_in_gtk3.py from the matplotlib examples directory
import gtk
from matplotlib.axes import Subplot
from matplotlib.figure import Figure
from matplotlib.numerix import arange, sin, pi
# uncomment to select /GTK/GTKAgg/GTKCairo
#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as
FigureCanvas
#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo
as FigureCanvas
win = gtk.Window()
win.connect("destroy", lambda x: gtk.main_quit())
win.set_default_size(400,300)
win.set_title("Embedding in GTK")
f = Figure(figsize=(5,4), dpi=100)
a = f.add_subplot(111)
t = arange(0.0,3.0,0.01)
s = sin(2*pi*t)
a.plot(t,s)
sw = gtk.ScrolledWindow()
win.add (sw)
# A scrolled window border goes outside the scrollbars and viewport
sw.set_border_width (10)
# policy: ALWAYS, AUTOMATIC, NEVER
sw.set_policy (hscrollbar_policy=gtk.POLICY_AUTOMATIC,
 vscrollbar_policy=gtk.POLICY_ALWAYS)
canvas = FigureCanvas(f) # a gtk.DrawingArea
canvas.set_size_request(800,600)
sw.add_with_viewport (canvas)
win.show_all()
gtk.main()
 
 
 
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
From: Eric F. <ef...@ha...> - 2007年03月26日 19:00:41
Attachments: mem_minimal.py
Jeff Whitaker wrote:
> Jesper Larsen wrote:
>> Hi matplotlib users,
>>
>> I'm using matplotlib for a long running process. Unfortunately the memory 
>> usage continue to grow as the process runs. I have appended a simple example 
>> which illustrates this at the end of this mail. Unfortunately I haven't 
>> figured out how to use the information obtainable from gc for anything useful 
>> in this regards.
[...]
>> 
> Jesper: Looks to me like the memory leak is not in Basemap, but somehow 
> the fig.clear() is not working properly. Replacing the fig.clear() with 
> pylab.gca() gets rid of the memory leak. I will investigate further ...
> 
> 
> -Jeff
> 
Jeff, this might be related to the leak illustrated in the attached 
script, based on an earlier report. (I don't recall who reported it.)
Eric
From: Edin S. <edi...@gm...> - 2007年03月26日 18:41:13
I don't now if it's appropriate to post this here, but there's a new
Python/Pylons powered website that uses matplotlib. Think of it as a
success story for mpl:
http://www.marketshares.com.au
I'm not affiliated in any way with the site owner/creator.
Best,
Edin
From: Edin S. <edi...@gm...> - 2007年03月26日 18:36:27
On 3/24/07, Bill Baxter <wb...@gm...> wrote:
> Did you guys make a conscious decision to have the matplotlib list
> send replies only to the sender of the message rather than the list?
>
> This seems to be the default at SourceForge, so it's conceivable you
> just haven't bothered to change it. I've been on at least 10
> different mailing lists in the past 2 years or so, and of those
> matplotlib's is the only one I can recall being set up with default
> reply-to-sender rather than reply-to-list.
>
> I keep accidentally replying to senders only, so I thought I'd mention
> it. In the admin section on sourceforge there's a checkbox you can
> set to change the list from reply-to-sender to reply-to-list as the
> default.
>
> --bb
Hmm...
I had similar problems in the past, and was pointed at:
http://www.unicom.com/pw/reply-to-harmful.html
The above doc makes sense IMO. It's just after reading it that I
noticed the reply-to-all button in GMail.
Edin
From: John H. <jd...@gm...> - 2007年03月26日 18:01:51
On 3/26/07, Christopher Barker <Chr...@no...> wrote:
> Bill Baxter wrote:
> > Did you guys make a conscious decision to have the matplotlib list
> > send replies only to the sender of the message rather than the list?
>
> This was a deliberate decision. At the time there was a discussion,
> including a link to a very well written blog entry on the subject,
> advocating the current practice.
>
> As well written as that essay is, I think it's based on false
> assumptions and inappropriate priorities.
I'm personally happy to change it but I currently mostly just use the
defaults. The mailman instructions encourage list admins to make
reply to posters the default. When I started using a new mail client
for this list (gmail) I had to train myself to hit 'a' (reply to all)
rather than 'r' (reply to sender). Now I've mostly gotten the routine
down so it is mostly a nonissue for me.
>From mailman:
Reply_goes_to_list (general): Where are replies to list messages
directed? Poster is strongly recommended for most mailing lists.
This option controls what Mailman does to the Reply-To: header in
messages flowing through this mailing list. When set to Poster, no
Reply-To: header is added by Mailman, although if one is present in
the original message, it is not stripped. Setting this value to either
This list or Explicit address causes Mailman to insert a specific
Reply-To: header in all messages, overriding the header in the
original message if necessary (Explicit address inserts the value of
reply_to_address).
There are many reasons not to introduce or override the Reply-To:
header. One is that some posters depend on their own Reply-To:
settings to convey their valid return address. Another is that
modifying Reply-To: makes it much more difficult to send private
replies. See `Reply-To' Munging Considered Harmful for a general
discussion of this issue. See Reply-To Munging Considered Useful for a
dissenting opinion.
Some mailing lists have restricted posting privileges, with a parallel
list devoted to discussions. Examples are `patches' or `checkin'
lists, where software changes are posted by a revision control system,
but discussion about the changes occurs on a developers mailing list.
To support these types of mailing lists, select Explicit address and
set the Reply-To: address below to point to the parallel list.
From: Christopher B. <Chr...@no...> - 2007年03月26日 17:18:39
Bill Baxter wrote:
> Did you guys make a conscious decision to have the matplotlib list
> send replies only to the sender of the message rather than the list?
This was a deliberate decision. At the time there was a discussion, 
including a link to a very well written blog entry on the subject, 
advocating the current practice.
As well written as that essay is, I think it's based on false 
assumptions and inappropriate priorities.
But I lost that one.
-Chris
PS: I almost sent this only to Bill!
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Jeff W. <js...@fa...> - 2007年03月26日 16:46:34
Jesper Larsen wrote:
> Hi matplotlib users,
>
> I'm using matplotlib for a long running process. Unfortunately the memory 
> usage continue to grow as the process runs. I have appended a simple example 
> which illustrates this at the end of this mail. Unfortunately I haven't 
> figured out how to use the information obtainable from gc for anything useful 
> in this regards.
>
> Kind regards,
> Jesper
>
>
> My system is:
>
> 
>> uname -a
>> 
> Linux sea 2.6.15-28-686 #1 SMP PREEMPT Thu Feb 1 16:14:07 UTC 2007 i686 
> GNU/Linux
>
> 
>> python
>> 
> Python 2.4.4 (#1, Nov 16 2006, 13:39:46)
> [GCC 3.3.3 (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>> import matplotlib
>>>> print matplotlib.__version__
>>>> 
> 0.87.6
> 
>>>> from matplotlib.toolkits import basemap
>>>> print basemap.__version__
>>>> 
> 0.9.4
>
> Test code:
>
> import os, gc
> import PyNGL.Nio as Nio
> from matplotlib.toolkits import basemap
> from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
> import pylab
>
> def report_memory(i):
> pid = os.getpid()
> a2 = os.popen('ps -p %d -o rss,vsz,%%mem' % pid).readlines()
> print i, ' ', a2[1],
> return int(a2[1].split()[1])
>
> def plot():
> #gc.set_debug(gc.DEBUG_LEAK)
> lon = pylab.linspace(-4.08300018311, 30.25, 207)
> lat = pylab.linspace(48.5499992371, 65.8499984741, 174)
> xo, yo = pylab.meshgrid(lon, lat)
> bmap = basemap.Basemap(-4, 48, 30, 66)
> xlon, ylat = bmap(xo,yo)
>
> fig = pylab.Figure()
> canvas = FigureCanvas(fig)
>
> i = 0
> while True:
> report_memory(i)
>
> fig.clear()
> cs = bmap.contourf(xlon, ylat, xo)
> del cs
>
> i += 1
>
> if __name__ == '__main__': plot()
>
> 
Jesper: For now I recommend adding 'pylab.cla()' after the fig.clear() 
as a workaround. I don't really understand why that is necessary - 
perhaps John or Eric can clarify whether this is indeed a bug.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Alan G I. <ai...@am...> - 2007年03月26日 15:41:38
From: Archana G. <arc...@gm...> - 2007年03月26日 15:17:49
Hi,
I am totally new to pylab. I have just started using it. So please excuse if
my problem is too silly.
I have an application that has creates different plots for different input
parameters. I take in the input values and do a show(), This works perfectly
fine. Now after performing some operations I want a different pliot. So when
I generate a different plot and do a show(), the plot gets generated but
when I try to close it, it hangs. The structure of the program is something
like this.
def OnSubmit( self, event ):
 blah blah blah..
 sim = Simulator()
 sim.run()
So the graph is being plotted within the run method of Simulator class.
Could you please help me as to where I am going wrong?
Thanks,
Archana.
From: Khare, R. <Ris...@fa...> - 2007年03月26日 14:41:02
Hi Angelo,
I have faced a similar problem on using "from pylab import *"
but not exactly the same,
" matplotlib._ns_transforms.so: undefined symbol:
_ZNSs4_Rep20_S_empty_rep_storage "=20
=20
And I have found that this problem is deep rooted with gcc level and not
with matplotlib,
The python which you are using should be compiled with gcc level 3.4.6
(or may be higher, I have tested with gcc-3.4.6),when I compiled it
gcc-3.2.3 on redhat linux I was getting this error=20
=20
Hope it helps
--Regards
Rishi Khare
=20
Date: 2007年3月25日 11:25:50 -0500
From: ro...@yo...
Subject: [Matplotlib-users] Lots of Error Messages Upon Invoking "from
 pylab import *"
To: mat...@li...
Message-ID: <200...@ma...>
Content-Type: text/plain; charset=3DISO-8859-1
=20
Hello:
=20
I am using kanotix which is a very stable debian sid system. I intalled
the matplotlib package from the debian database successfully. It may
have pulled in python 2.4 as well. Please see what happens when I use
the command "from pylab import *" within python.
=20
Can someone please help me with this?
=20
Kind regards,
=20
Angelo
=20
rossi@KanotixBox:~$ python
Python 2.4.4 (#2, Jan 13 2007, 17:50:26) [GCC 4.1.2 20061115
(prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright",
"credits" or "license" for more information.
>>> from pylab import *
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/usr/lib/python2.4/site-packages/pylab.py", line 1, in ?
 from matplotlib.pylab import *
 File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 197,
in ?
 import cm
 File "/usr/lib/python2.4/site-packages/matplotlib/cm.py", line 5, in ?
 import colors
 File "/usr/lib/python2.4/site-packages/matplotlib/colors.py", line 33,
in ?
 from numerix import array, arange, take, put, Float, Int, where, \
 File
"/usr/lib/python2.4/site-packages/matplotlib/numerix/__init__.py",
line 73, in ?
 import numpy
 File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 40, in
?
 import linalg
 File "/usr/lib/python2.4/site-packages/numpy/linalg/__init__.py", line
4, in ?
 from linalg import *
 File "/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", line
25, in ?
 from numpy.linalg import lapack_lite
ImportError: /usr/lib/atlas/liblapack.so.3: undefined symbol: ATL_ctbmv
=20
This email and any files transmitted with it are confidential, proprietar=
y
and intended solely for the individual or entity to whom they are address=
ed.
If you have received this email in error please delete it immediately.
=0D
From: Jeff W. <js...@fa...> - 2007年03月26日 14:09:46
Jesper Larsen wrote:
> Hi matplotlib users,
>
> I'm using matplotlib for a long running process. Unfortunately the memory 
> usage continue to grow as the process runs. I have appended a simple example 
> which illustrates this at the end of this mail. Unfortunately I haven't 
> figured out how to use the information obtainable from gc for anything useful 
> in this regards.
>
> Kind regards,
> Jesper
>
>
> My system is:
>
> 
>> uname -a
>> 
> Linux sea 2.6.15-28-686 #1 SMP PREEMPT Thu Feb 1 16:14:07 UTC 2007 i686 
> GNU/Linux
>
> 
>> python
>> 
> Python 2.4.4 (#1, Nov 16 2006, 13:39:46)
> [GCC 3.3.3 (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>> import matplotlib
>>>> print matplotlib.__version__
>>>> 
> 0.87.6
> 
>>>> from matplotlib.toolkits import basemap
>>>> print basemap.__version__
>>>> 
> 0.9.4
>
> Test code:
>
> import os, gc
> import PyNGL.Nio as Nio
> from matplotlib.toolkits import basemap
> from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
> import pylab
>
> def report_memory(i):
> pid = os.getpid()
> a2 = os.popen('ps -p %d -o rss,vsz,%%mem' % pid).readlines()
> print i, ' ', a2[1],
> return int(a2[1].split()[1])
>
> def plot():
> #gc.set_debug(gc.DEBUG_LEAK)
> lon = pylab.linspace(-4.08300018311, 30.25, 207)
> lat = pylab.linspace(48.5499992371, 65.8499984741, 174)
> xo, yo = pylab.meshgrid(lon, lat)
> bmap = basemap.Basemap(-4, 48, 30, 66)
> xlon, ylat = bmap(xo,yo)
>
> fig = pylab.Figure()
> canvas = FigureCanvas(fig)
>
> i = 0
> while True:
> report_memory(i)
>
> fig.clear()
> cs = bmap.contourf(xlon, ylat, xo)
> del cs
>
> i += 1
>
> if __name__ == '__main__': plot()
> 
Jesper: Looks to me like the memory leak is not in Basemap, but somehow 
the fig.clear() is not working properly. Replacing the fig.clear() with 
pylab.gca() gets rid of the memory leak. I will investigate further ...
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Robert C. <cim...@nt...> - 2007年03月26日 08:52:30
Bill Baxter wrote:
> gah! bitten by reply to sender once again.
Yes, this is a bit annoying.
> ---------- Forwarded message ----------
> From: Bill Baxter <wb...@gm...>
> Date: Mar 24, 2007 12:09 PM
> Subject: Re: [Matplotlib-users] interactive plots again
> To: Robert Cimrman <cim...@nt...>
> 
> 
> Are you sure that's threadsafe?
> With most windowing toolkits it's not safe to do GUI things from
> threads other than the main one. Other threads can only post a
> message to the main GUI thread. Depending on how fig.canvas.draw is
> implemented, calling it from another thread might not be kosher. But
> I take it you haven't seen any meltdowns so far, so maybe its
> implementation does the threadsafe message posting thing.
I am not sure (never used threads before), but it works for my
application and is very simple :). I do not have any GUI (meaning
top-level window with menus etc. driving some backend). Instead, I have
a command line program that interactively (pylab.ion()) pops up a figure
window and calls pylab.ioff(). Then from time to time it plots some data
and I want the figure window updated. There is no show() call while the
updating thread is running, so there is no GUI event loop, is that right?
Thank you for your comment, I am new to threading issues.
r.
5 messages has been excluded from this view by a project administrator.

Showing results of 335

<< < 1 2 3 4 5 6 .. 14 > >> (Page 4 of 14)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /