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
(11)
2
(1)
3
(5)
4
(25)
5
(14)
6
(36)
7
(13)
8
(15)
9
10
(5)
11
(5)
12
(11)
13
(15)
14
(9)
15
(16)
16
(3)
17
(13)
18
(7)
19
(9)
20
(12)
21
(2)
22
(6)
23
24
(2)
25
(1)
26
(16)
27
(7)
28
(11)
29
(8)
30
(1)

Showing 12 results of 12

From: John H. <jdh...@ac...> - 2006年09月20日 22:47:47
>>>>> "George" == George Nurser <gn...@go...> writes:
 George> SVN revision 2774, linux 64-bit, TkAgg, NumPy. If I
 George> create a figure on the screen (TkAgg back end), when I try
 George> to save it as .ps, the resulting file displays and prints
 George> as blank. However I can save it as .eps (or png)
 George> perfectly well.
tkagg passes its printing off to agg, which passes both *.ps and *.eps
to backend_ps with no further processing. So if there is a problem,
it should show up on a pure PS backend, eg
import matplotlib
matplotlib.use('PS')
from pylab import figure, show
fig = figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3])
fig.savefig('test.ps')
fig.savefig('test.eps')
Is anyone seeing problems with this?
There is, however, a known bug when using tkagg from pylab, after you
click the save button pylab loses the current figure. This appears to
be a tkinter bug and I reported it on python-list and go no response.
If this is the cause of your problem, it is not about PS vs EPS vs
PNG, but about which filetype you try and save first. The first one
would work, and subsequent ones would fail.
JDH
From: George N. <gn...@go...> - 2006年09月20日 21:30:24
SVN revision 2774, linux 64-bit, TkAgg, NumPy.
If I create a figure on the screen (TkAgg back end), when I try to
save it as .ps, the resulting file displays and prints as blank.
However I can save it as .eps (or png) perfectly well.
-George Nurser.
From: Jonathan P. <pe...@gm...> - 2006年09月20日 19:57:25
After attempting to install matplotlib-0.87.5 from source on an intel
mac (OS X 10.4.7), I get an error when importing the pylab module.
This appears to be the same error reported in:
http://sourceforge.net/mailarchive/forum.php?thread_id=30574221&forum_id=33405
My attempt was with freetype-2.2.1 and Python 2.4.3.
The error message is:
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py
 37 import matplotlib
 38 from matplotlib import afm
---> 39 from matplotlib import ft2font
 40 from matplotlib import rcParams, get_data_path, get_home, get_configdir
 41
ImportError: Failure linking new module:
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so:
Symbol not found: _FMDisposeFontFamilyIterator
 Referenced from: /usr/local/lib/libfreetype.6.dylib
 Expected in: flat namespace
I've done a bit of sleuthing but haven't found anything very helpful.
If anyone has any insight as to what is causing the error, or even
better how to fix it, I would appreciate it. Let me know if there is
any other helpful information I can provide.
Many thanks,
-Jonathan
From: Andrew J. <a.h...@gm...> - 2006年09月20日 19:11:34
Hi all,
As discussed by David Cooke, above, I think there are still some other 
issues, at least under OSX: several files need to be patch to convert 
int to the new Py_ssize_t, at least in cxx_extensions.cxx and _image.cpp
Will these be changed?
Andrew
Achim Gaedke wrote:
> Hi there!
> 
> I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
> use numarray as standard numerix extension.
> There was a bugfix for numpy-1.0b5 that is already contained in their
> repository version.
> 
> Yours, Achim
> 
> Charlie Moad wrote:
>> It builds now. We still have to wait on a useable numpy for python2.5
>> and pygtk for windows/py2.5. All the other components are there or we
>> can build.
> 
From: Achim G. <Ach...@ph...> - 2006年09月20日 17:17:34
Attachments: fixed_diff
Hi there!
I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
use numarray as standard numerix extension.
There was a bugfix for numpy-1.0b5 that is already contained in their
repository version.
Yours, Achim
Charlie Moad wrote:
> It builds now. We still have to wait on a useable numpy for python2.5
> and pygtk for windows/py2.5. All the other components are there or we
> can build.
From: Charlie M. <cw...@gm...> - 2006年09月20日 16:44:19
It builds now. We still have to wait on a useable numpy for python2.5
and pygtk for windows/py2.5. All the other components are there or we
can build.
On 9/20/06, John Hunter <jdh...@ac...> wrote:
> >>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
>
> Charlie> This came up on the dev list yesterday and we tried with
> Charlie> swig-1.3.29, which is the latest listed release on SF.
> Charlie> The link you provided shows this was indeed fixed after
> Charlie> the 1.3.29 release. Jon, can we give bleeding edge swig
> Charlie> a try?
>
> OK, bleeding edge SWIG versions of the agg wrappers are in svn.
>
> Good luck!
>
> JDH
>
From: Fraser, A. <a.f...@im...> - 2006年09月20日 16:01:47
Hi
I am installing matplotlib-0.87.5 on a red hat linux system with Python =
2.4. I have all the listed packages installed on my linux. I have =
reinstalled it several times but it is still failing with TkAgg. I have =
removed and reinstalled all the components several times, but it still =
fails.
During the build the only messages that seemed unusual relate to=20
/usr/include/features.h:150:1: warning: this is the location of the =
previous definition
When I install matplotlib and test it with=20
python subplot_demo.py -dagg it works fine
python subplot_demo.py -dTkAgg it fails
Unfortunatly I need the TkAgg backend working.
msg.
 File "subplot_demo.py", line 2, in ?
 from pylab import *
 File "/home/arfras/local/cdat/lib/python2.4/site-packages/pylab.py", =
line 1, in ?
 from matplotlib.pylab import *
 File =
"/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/pylab.py"=
, line 219, in ?
 new_figure_manager, draw_if_interactive, show =3D pylab_setup()
 File =
"/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/=
__init__.py", line 23, in pylab_setup
 globals(),locals(),[backend_name])
 File =
"/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/=
backend_tkagg.py", line 8, in ?
 import tkagg # Paint image to Tk photo blitter =
extension
 File =
"/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/=
tkagg.py", line 1, in ?
 import _tkagg
ImportError: =
/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/_=
tkagg.so: undefined symbol: XSetInputFocus
Any ideas?
Andrea
From: John H. <jdh...@ac...> - 2006年09月20日 15:42:09
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> This came up on the dev list yesterday and we tried with
 Charlie> swig-1.3.29, which is the latest listed release on SF.
 Charlie> The link you provided shows this was indeed fixed after
 Charlie> the 1.3.29 release. Jon, can we give bleeding edge swig
 Charlie> a try?
OK, bleeding edge SWIG versions of the agg wrappers are in svn.
Good luck!
JDH
From: Lionel R. <lro...@li...> - 2006年09月20日 14:47:09
Hi all,
I use a array with dtype=object for mixing datetime and float values, like:
##########################################
lionel[ETD-2006-01__PM2.5_DALTON]68>datas[0:5,]
Sortie[68]:
array(data =
 [[2006年01月05日 00:00:00 33.0 1e-20]
 [2006年01月06日 00:00:00 41.0 30.0]
 [2006年01月07日 00:00:00 20.0 16.0]
 [2006年01月08日 00:00:00 16.0 13.0]
 [2006年01月09日 00:00:00 18.0 15.0]],
 mask =
 [[False False True]
 [False False False]
 [False False False]
 [False False False]
 [False False False]],
 fill_value=1e-20)
##########################################
but I get a error when I want to plot directly using
plot_date(date2num(datas[:,0]),datas[:,1]):
##########################################
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent 
call last)
/home/lionel/Etudes_Techniques/ETD-2006-01__PM2.5_DALTON/<ipython console>
/usr/lib/python2.4/site-packages/matplotlib/pylab.py in plot_date(*args, 
**kwargs)
 2038 hold(h)
 2039 try:
-> 2040 ret = gca().plot_date(*args, **kwargs)
 2041 draw_if_interactive()
 2042 except:
/usr/lib/python2.4/site-packages/matplotlib/axes.py in plot_date(self, x, y, 
fmt, tz, xdate, ydate, **kwargs)
 2159 if not self._hold: self.cla()
 2160
-> 2161 ret = self.plot(x, y, fmt, **kwargs)
 2162
 2163 if xdate:
/usr/lib/python2.4/site-packages/matplotlib/axes.py in plot(self, *args, 
**kwargs)
 2121 if not self._hold: self.cla()
 2122 lines = []
-> 2123 for line in self._get_lines(*args, **d):
 2124 self.add_line(line)
 2125 lines.append(line)
/usr/lib/python2.4/site-packages/matplotlib/axes.py in _grab_next_args(self, 
*args, **kwargs)
 308 if not is_string_like(remaining[2]):
 309 raise ValueError, 'third arg must be a format 
string'
--> 310 yield self._plot_3_args(remaining, **kwargs)
 311 remaining=[]
 312 continue
/usr/lib/python2.4/site-packages/matplotlib/axes.py in _plot_3_args(self, 
tup3, **kwargs)
 279 linestyle=linestyle, marker=marker,
 280 markerfacecolor=color,
--> 281 markeredgecolor=mec,
 282 )
 283 self.set_lineprops(ret, **kwargs)
/usr/lib/python2.4/site-packages/matplotlib/lines.py in __init__(self, xdata, 
ydata, linewidth, linestyle, color, marker, markersize, markeredgewidth, 
markeredgecolor, markerfacecolor, antialiased, dash_capstyle, solid_capstyle, 
dash_joinstyle, solid_joinstyle, **kwargs)
 204 self.verticalOffset = None
 205
--> 206 self.set_data(xdata, ydata)
 207
 208 if not self._lineStyles.has_key(linestyle):
/usr/lib/python2.4/site-packages/matplotlib/lines.py in set_data(self, *args)
 280
 281 self._x = asarray(x, Float)
--> 282 self._y = asarray(y, Float)
 283
 284 self._logcache = None
/usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py in asarray(a, 
typecode, dtype)
 82 def asarray(a, typecode=None, dtype=None):
 83 dtype = convtypecode2(typecode, dtype)
---> 84 return mu.array(a, dtype, copy=0)
 85
 86 def nonzero(a):
TypeError: array cannot be safely cast to required type
##########################################
but the line:
plot_date(date2num(datas[:,0]), ma.masked_values(datas[:,1].tolist() ,1.e-20)) 
works perfectly. Do I do something wrong?
thanks
-- 
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: Charlie M. <cw...@gm...> - 2006年09月20日 12:17:29
This came up on the dev list yesterday and we tried with swig-1.3.29,
which is the latest listed release on SF. The link you provided shows
this was indeed fixed after the 1.3.29 release. Jon, can we give
bleeding edge swig a try?
Thanks,
 Charlie
On 9/20/06, Achim Gaedke <Ach...@ph...> wrote:
> Hello Charlie!
>
> Hmmm... Basically you are right. But maybe you are more familiar with
> SWIG issues than I am.
>
> Ok, I will do the job and go to swig and have a look:
>
> http://swig.cvs.sourceforge.net/swig/SWIG/Lib/python/pyrun.swg?r1=1.143&r2=1.144
>
> You will find this error corrected five months ago.
>
> You are using version: 1.3.27 (as stated in the file's header), the last
> official release is 1.3.12 (June 2006) and the latest cvs version 1.3.30
> (in progress). I do not understand why this version is not in use...
>
> Maybe you should try the latest SWIG version.
>
> Yours, Achim
>
> Charlie Moad wrote:
> > Thanks for the patch. Ideally we need to find a way to fix this in
> > swig though. Otherwise we would have to reapply the patch every time
> > we regenerate the wrappings.
>
>
From: Achim G. <Ach...@ph...> - 2006年09月20日 12:11:32
Hello Charlie!
Hmmm... Basically you are right. But maybe you are more familiar with
SWIG issues than I am.
Ok, I will do the job and go to swig and have a look:
http://swig.cvs.sourceforge.net/swig/SWIG/Lib/python/pyrun.swg?r1=1.143&r2=1.144
You will find this error corrected five months ago.
You are using version: 1.3.27 (as stated in the file's header), the last
official release is 1.3.12 (June 2006) and the latest cvs version 1.3.30
(in progress). I do not understand why this version is not in use...
Maybe you should try the latest SWIG version.
Yours, Achim
Charlie Moad wrote:
> Thanks for the patch. Ideally we need to find a way to fix this in
> swig though. Otherwise we would have to reapply the patch every time
> we regenerate the wrappings.
From: <coo...@ph...> - 2006年09月20日 07:55:32
Achim Gaedke
<Ach...@ph...>
writes:
> While compiling matplotlib-0.87.5 with python-2.5 on debian testing some
> errors occured:
>
[snip errors]
>
>
> similar errors occured in src/swig_runtime.h
>
> src/swig_runtime.h: In function 'int SWIG_Python_ConvertPtr(PyObject*,
> void**, swig_type_info*, int)':
> src/swig_runtime.h:1140: error: invalid conversion from 'const char*' to
> 'char*'
There are also problems with the CXX/ code using int instead of
Py_ssize_t. I've submitted a patch with fixes for that, and your patch
for the above problem:
http://sourceforge.net/tracker/index.php?func=detail&aid=1561959&group_id=80706&atid=560722
-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca

Showing 12 results of 12

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 によって変換されたページ (->オリジナル) /