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





Showing results of 318

<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)
From: Matthias M. <Mat...@gm...> - 2007年04月27日 16:01:52
Hi devolopers,
one small remark about the mpl svn. I recognized, that in the 
file ./lib/matplotlib/__init__.py the actual revision is: 
__revision__ = '$Revision: 3131 $'
and the svn info tells "Revision: 3257".
best regards,
Matthias 
From: Matthias M. <Mat...@gm...> - 2007年04月27日 15:42:27
Hi everybody,
I use key_press_event's to handle my program.
Therefore I want to skip the matplotlib usage of some keys e.g. 'f', 'g' 
and 'l'.
I didn't find the right method to turn the usage off. Can anybody help me?
 
Could this method be useful for buttons and sliders from widgets.py, too?
Because one don't want to scale or set grid upon these widgets, isn't it? 
best regards and thanks in advance for any hints,
Matthias
From: John H. <jd...@gm...> - 2007年04月27日 14:45:40
On 4/27/07, darkside <in....@gm...> wrote:
> hi everyone,
> I'm trying to solve a lineal differential equation system, and I,m proving
> with the mlab.rk4 function.
> The problem I've found is that if the solution if a complex number, I can't
> use this functin, because it doesn't accept complex number, and I can only
> get the real case.
>
> Have anyone treat with this problem?
> What do you use to solve differential equation systems?
rk4 was something I wrote long ago to have a simple ODE integrator in
case scipy wasn't installed on my system. You should be using the
scipy.integrate tools
From: darkside <in....@gm...> - 2007年04月27日 12:59:29
hi everyone,
I'm trying to solve a lineal differential equation system, and I,m proving
with the mlab.rk4 function.
The problem I've found is that if the solution if a complex number, I can't
use this functin, because it doesn't accept complex number, and I can only
get the real case.
Have anyone treat with this problem?
What do you use to solve differential equation systems?
From: John H. <jd...@gm...> - 2007年04月27日 02:09:05
On 4/26/07, James Boyle <bo...@ll...> wrote:
> What is the easiest way to put a label on the color bar. I am
> thinking of putting units either below or next to the bar.
> I do not see this in the examples or wiki.
> My first guess is to get hold of the axis for the colorbar and put a
> label using this - but this seems a bit roundabout.
colorbar returns a matplotlib.colorbar.Colorbar instance. This has an
Axes attribute attached as "ax", eg
 cb = fig.colorbar(...)
 cb.ax.set_xlabel('etc')
but you should look at the class methods available in the Colorbar
class proper. Eg, Colorbar.set_label will set either the xlabel or
the ylabel depending on the orientation.
JDH
From: James B. <bo...@ll...> - 2007年04月26日 23:32:57
What is the easiest way to put a label on the color bar. I am 
thinking of putting units either below or next to the bar.
I do not see this in the examples or wiki.
My first guess is to get hold of the axis for the colorbar and put a 
label using this - but this seems a bit roundabout.
--Jim
 
From: Christopher F. <fon...@gm...> - 2007年04月26日 18:23:30
Christopher Fonnesbeck <fonnesbeck@...> writes:
> 
> On recent builds of matplotlib (svn and 0.90) I encounter an import error when
> trying to import pylab:
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
> /matplotlib/numerix/__init__.py",
> line 20, in <module>
> from matplotlib import rcParams, verbose
...
> ImportError: cannot import name rcParams
> 
Update: Actually this appears to be related to the bdist_mpkg module that I used
to build the metapackage. Installing from the command line completely fixes the
problem. Not sure how to fix this though.
From: Christopher F. <fon...@gm...> - 2007年04月26日 17:55:08
On recent builds of matplotlib (svn and 0.90) I encounter an import error when
trying to import pylab:
>>> import pylab
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
/pylab.py",
line 1, in <module>
 from matplotlib.pylab import *
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
/matplotlib/pylab.py",
line 199, in <module>
 import cm
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
/matplotlib/cm.py",
line 5, in <module>
 import colors
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
/matplotlib/colors.py",
line 33, in <module>
 from numerix import array, arange, take, put, Float, Int, putmask, \
 File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
/matplotlib/numerix/__init__.py",
line 20, in <module>
 from matplotlib import rcParams, verbose
ImportError: cannot import name rcParams
It appears to be a numerix problem. Any idea why this is missing?
From: Matthias M. <Mat...@gm...> - 2007年04月26日 12:24:28
Attachments: key_event_add.patch
Hello everybody,
sometimes I need more than the available key events - 
e.g. 'enter', 'backspace' or the keys from numeric keypad.
That's why I tried to include more events in the backends (backend_wx.py, 
backend_tkagg.py, backend_gtk.py).
I tested it on a debian etch (Python 2.4.4, wxpython 2.6.3.2). 
Attached is a patch to svn.
Maybe some expert could have a look over this and, if suitable, include it in 
matplotlib.
I don't know much about backends. That's why some problems remained: 
TkAgg: No difference in behaviour if Num Lock is locked or not (you always get 
the number characters).
Gtk : With NumLock locked the keys give 'None'. With NumLock unlocked the 
number characters occur in my program, but the PC uses the arrow keys, too. 
Therefore you switch to the mpl-figure-toolbar and the keys don't work 
anymore.
best regards, 
Matthias
From: Patrick M. <opt...@ro...> - 2007年04月26日 12:12:06
Hi Everyone
I would like to create a live plot to plot data coming from a data port, 
such as a serial port.
I am still very new to Matplotlib and a template to work from would 
really help.
Any suggestions would be really appreciated.
Thanks-Patrick
From: <bre...@un...> - 2007年04月26日 01:09:05
Thanks John, that works perfectly.
Best regards,
Brett McSweeney
On 4/23/07, bre...@un...
<bre...@un...> wrote:
>
> I'm producing series of plots (spectograms) in a program loop using 
imshow
> and saving each plot to .png. Even though I close() each plot after 
each
> savefig(...), the memory does not appear to be freed up, and the memory
> useage goes up and up as the program runs (and stalls the computer as it
> thrashes the page file).
>
> This is the essence of the code:
>
> for i in range(..):
> pylab.imshow(logPSDs[i]...)
> pylab.colorbar()
> pylab.savefig(plotName[i])
> pylab.close()
The following code does not appear to leak:
import matplotlib
matplotlib.use('Agg')
from matplotlib.cbook import report_memory
import matplotlib.numerix as nx
import pylab
for i in range(100):
 print i, report_memory(i)
 fig = pylab.figure(1)
 X = nx.mlab.rand(100,100)
 pylab.imshow(X)
 pylab.colorbar()
 pylab.savefig('_test%d'%i)
 pylab.close(1)
Are you running your program in a GUI? Eric points out there are some
leaks in the GUI canvases which we have not succeeded in tracking
down. If you only want image generation, you can use an image backend
w/o leaks. The one thing to be careful of is to make sure you are not
overplotting multiple images onto the same Axes, eg by clearing the
figure or axes if you are reusing it.
JDH
>
> Is there anything that I should be doing to stop this memory "wastage"?
> (The plots themselves are fantastic!)
> UNITED GROUP
> This email message is the property of United Group. The information in 
this
> email is confidential and may be legally privileged. It is intended 
solely
> for the addressee. Access to this email by anyone else is unauthorised. 
If
> you are not the intended recipient, you may not disclose, copy or 
distribute
> this email, nor take or omit to take any action in reliance on it. 
United
> Group accepts no liability for any damage caused by this email or any
> attachments due to viruses, interference, interception, corruption or
> unauthorised access.
> If you have received this email in error, please notify United Group
> immediately by email to the sender's email address and delete this 
document.
>
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
UNITED GROUP
This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access.
If you have received this email in error, please notify United Group immediately by email to the sender's email address and delete this document.
From: Michael L. <mgl...@gm...> - 2007年04月25日 22:25:03
Hi,
I have a square matrix that I'm plotting with pcolormesh. I want to
highlight certain parts of it. For instance, I might want to
highlight rows and columns 4-20 and 67-80. I can get the opposite of
what I want by doing something like
pylab.axvspan(4,20,fc='white',lw=0.,alpha=0.15)
pylab.axvspan(67,80,fc='white',lw=0.,alpha=0.15)
pylab.axhspan(4,20,fc='white',lw=0.,alpha=0.15)
pylab.axhspan(67,80,fc='white',lw=0.,alpha=0.15)
but that makes it look like the regions I want to highlight are washed
out. I'd like the inverse, where I wash out everything else. How can
I do this?
My first thought was that I might be able to do something with a mask,
where I could plot the data once, then plot it again with a
semitransparent white mask over the parts I didn't want to highlight.
Here's some sample code where I tried to do that (this time masking
out some easy-to-calculate part of the matrix):
#!/usr/bin/env python
import pylab as P
import numpy as N
plotter = P.pcolormesh
plotterargs = {P.imshow:{'interpolation':'nearest','origin':'lower'},
 P.pcolormesh:{}}
n = 10
data = N.zeros((n,n))
for i in range(n):
 for j in range(n):
 data[i,j] = i*j
plotter(data,vmin=0,vmax=n*n,**plotterargs[plotter])
cmap = P.cm.jet
cmap.set_bad('white',alpha=0.5)
mask = data < 16
data = N.ma.masked_where(mask,data)
plotter(data,cmap=cmap,vmin=0,vmax=n*n,**plotterargs[plotter])
P.show()
If you run it, you'll see that the masked part just ends up grey.
However, if you set plotter to P.imshow, it looks like it pretty much
does what I want. So, I think I might be close to the answer. Can
someone help me figure it out?
Thanks,
-michael
-- 
Biophysics Graduate Student
Carlson Lab, University of Michigan
http://www.umich.edu/~mlerner http://lernerclan.net
http://www.umich.edu/~mlerner http://lernerclan.net
From: Ryan K. <rya...@gm...> - 2007年04月25日 22:01:49
My CiSE article can be downloaded from here:
http://www.siue.edu/~rkrauss/python_stuff.html
Ryan
On 4/25/07, John Hunter <jd...@gm...> wrote:
> On 4/25/07, Fernando Perez <fpe...@gm...> wrote:
> > Since authors are allowed by their publication policy to keep a
> > publicly available copy of their papers on their personal website,
> > here's the ipython one:
>
> Didn't know that... here's a link to my matplotlib article
>
> http://nitace.bsd.uchicago.edu/misc/c3sci.pdf
>
> It might be nice to create a scipy wiki page linking to these PDFs.
>
> JDH
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Suresh P. <sto...@ya...> - 2007年04月25日 21:28:51
This is correct, and is standard for almost all publications I know. You 
are allowed to publish the article on your own personal website (provided
you use the published version or explicitly list the copyrights), but 
nowhere else.
Cheers,
Suresh
On 2007年4月25日, Fernando Perez wrote:
> Well, I simply interpreted 'personal' as "my personal page, on my
> institution's servers", while I worry that physically uploading it to
> scipy's servers, which are owned by an external entity (Enthought)
> might land them in trouble. I may be overly cautious here, but I just
> didn't want to take chances.
>
> Cheers,
From: Fernando P. <fpe...@gm...> - 2007年04月25日 21:13:59
On 4/25/07, Christopher Barker <Chr...@no...> wrote:
> Fernando Perez wrote:
> > This explicitly mentions author website redistribution, as long as
> > the official IEEE version is used.
> >
> > Unless I'm misreading the above, I think it's OK for us to keep such
> > copies in our personal sites. We can link to them from the scipy
> > wiki, though I don't think it would be OK to /copy/ the PDFs to the
> > scipy wiki.
>
> I assume you are referring to this:
>
> ""
> D. Personal Servers. Authors and/or their companies shall have the right
> to post their IEEE-copyrighted material on their own servers without
> permission, provided that the server displays a prominent notice
> alerting readers to their obligations with respect to copyrighted
> material and that the posted work includes the IEEE copyright notice as
> shown in Section 8.1.9A above.
> """
>
> IANAL either, but I'm not sure how they would define a "personal"
> server. Would a web page on a University server count, for instance? I"d
> think putting it on the Wiki would count. Key is that copyright is
> properly attributed.
>
> I assume there is someone at IEEE that you could ask.
Well, I simply interpreted 'personal' as "my personal page, on my
institution's servers", while I worry that physically uploading it to
scipy's servers, which are owned by an external entity (Enthought)
might land them in trouble. I may be overly cautious here, but I just
didn't want to take chances.
Cheers,
f
From: Christopher B. <Chr...@no...> - 2007年04月25日 17:04:35
Fernando Perez wrote:
> This explicitly mentions author website redistribution, as long as
> the official IEEE version is used.
> 
> Unless I'm misreading the above, I think it's OK for us to keep such
> copies in our personal sites. We can link to them from the scipy
> wiki, though I don't think it would be OK to /copy/ the PDFs to the
> scipy wiki.
I assume you are referring to this:
""
D. Personal Servers. Authors and/or their companies shall have the right 
to post their IEEE-copyrighted material on their own servers without 
permission, provided that the server displays a prominent notice 
alerting readers to their obligations with respect to copyrighted 
material and that the posted work includes the IEEE copyright notice as 
shown in Section 8.1.9A above.
"""
IANAL either, but I'm not sure how they would define a "personal" 
server. Would a web page on a University server count, for instance? I"d 
think putting it on the Wiki would count. Key is that copyright is 
properly attributed.
I assume there is someone at IEEE that you could ask.
-Chris
-- 
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: Andrew S. <str...@as...> - 2007年04月25日 16:56:03
Andrew Straw wrote:
> (Off list...)
> 
Eek, well, not off-list! :)
From: Andrew S. <str...@as...> - 2007年04月25日 16:37:55
(Off list...)
(Another g-mailer, huh? Soon they'll know everything about everyone...)
Thanks for that info re: online paper copies. I'm actually a week or two 
away from submitting a follow-up paper from my SciPy '06 talk to them... 
And submitting to a non-open-access journal was one issue. But this 
makes it... bearable.
Cannae make SciPy '07 :( Will be at a insect/robot flight conference in 
the Italian-speaking part of Switzerland! :)
-Andrew
Fernando Perez wrote:
> On 4/25/07, John Hunter <jd...@gm...> wrote:
>> On 4/25/07, Fernando Perez <fpe...@gm...> wrote:
>> > Since authors are allowed by their publication policy to keep a
>> > publicly available copy of their papers on their personal website,
>> > here's the ipython one:
>>
>> Didn't know that... here's a link to my matplotlib article
>
> I'm going by the language here:
>
> http://www.ieee.org/web/publications/rights/policies.html
>
> Specifically:
>
> When IEEE publishes the work, the author must replace the previous
> electronic version of the accepted paper with either (1) the full
> citation to the IEEE work or (2) the IEEE-published version, including
> the IEEE copyright notice and full citation. Prior or revised versions
> of the paper must not be represented as the published version.
>
>
> This explicitly mentions author website redistribution, as long as
> the official IEEE version is used.
>
> Unless I'm misreading the above, I think it's OK for us to keep such
> copies in our personal sites. We can link to them from the scipy
> wiki, though I don't think it would be OK to /copy/ the PDFs to the
> scipy wiki.
>
> As always, IANAL and all that.
>
> Cheers,
>
> f
From: Fernando P. <fpe...@gm...> - 2007年04月25日 16:29:04
On 4/25/07, John Hunter <jd...@gm...> wrote:
> On 4/25/07, Fernando Perez <fpe...@gm...> wrote:
> > Since authors are allowed by their publication policy to keep a
> > publicly available copy of their papers on their personal website,
> > here's the ipython one:
>
> Didn't know that... here's a link to my matplotlib article
I'm going by the language here:
http://www.ieee.org/web/publications/rights/policies.html
Specifically:
 When IEEE publishes the work, the author must replace the previous
electronic version of the accepted paper with either (1) the full
citation to the IEEE work or (2) the IEEE-published version, including
the IEEE copyright notice and full citation. Prior or revised versions
of the paper must not be represented as the published version.
This explicitly mentions author website redistribution, as long as
the official IEEE version is used.
Unless I'm misreading the above, I think it's OK for us to keep such
copies in our personal sites. We can link to them from the scipy
wiki, though I don't think it would be OK to /copy/ the PDFs to the
scipy wiki.
As always, IANAL and all that.
Cheers,
f
From: John H. <jd...@gm...> - 2007年04月25日 16:18:59
On 4/25/07, Fernando Perez <fpe...@gm...> wrote:
> Since authors are allowed by their publication policy to keep a
> publicly available copy of their papers on their personal website,
> here's the ipython one:
Didn't know that... here's a link to my matplotlib article
http://nitace.bsd.uchicago.edu/misc/c3sci.pdf
It might be nice to create a scipy wiki page linking to these PDFs.
JDH
From: Fernando P. <fpe...@gm...> - 2007年04月25日 16:11:07
On 4/25/07, Andrew Straw <str...@as...> wrote:
> The May/June issue of Computing in Science and Engineering
> http://computer.org/cise: is out and has a Python theme. Many folks we
> know and love from the community and mailing lists contribute to the
> issue. Read articles by Paul Dubois and Travis Oliphant for free online.
<plug>
Since authors are allowed by their publication policy to keep a
publicly available copy of their papers on their personal website,
here's the ipython one:
http://amath.colorado.edu/faculty/fperez/preprints/ipython-cise-final.pdf
</plug>
Cheers,
f
From: Thorsten K. <tho...@go...> - 2007年04月25日 16:02:55
Hi everyone,
I'm new here and I have a question ( I guess as everybody who is new here
;-) ),
I'm having some strange problem with Matplotlib, using it in a Tkinter
application.
I create a Canvas, a figure, subplot and then a toolbar. It works fine, but
only without the toolbar! When I want to add the toolbar, I get an error
 File "./tkViewer.py", line 102, in setupGUI
 self.toolbar = NavigationToolbar2TkAgg( self.canvas, master )
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 537, in __init__
 NavigationToolbar2.__init__(self, canvas)
 File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py", line
1107, in __init__
 self._init_toolbar()
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 577, in _init_toolbar
 borderwidth=2)
 File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 2378, in __init__
 Widget.__init__(self, master, 'frame', cnf, {}, extra)
 File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1865, in __init__
 self.tk.call(
_tkinter.TclError: bad screen distance "500.0"
Here is the part my code:
 self.canvFrame = Frame(master)
 self.canvFrame.pack(side=TOP, fill=BOTH, expand=1)
 self.canvFrame2 = Frame(self.canvFrame)
 self.canvFrame2.pack(side=LEFT, fill=BOTH, expand=1)
 self.f = Figure(figsize=(5,4), dpi=100)
 self.a = self.f.add_subplot(111)
 self.subplAxis = self.f.get_axes()
 self.canvas = FigureCanvasTkAgg(self.f, master=self.canvFrame2)
 self.canvas.show()
 self.canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1)
 self.toolbar = NavigationToolbar2TkAgg( self.canvas, self.canvFrame2)
 self.toolbar.update()
 self.canvas._tkcanvas.pack(side=TOP, fill=X, expand=1)
Master is a parameter passed to my method, which actually is set to Tk()
What did I get wrong? What is the problem? Thanks in advance...
Thorsten
From: Andrew S. <str...@as...> - 2007年04月25日 15:52:11
The May/June issue of Computing in Science and Engineering 
http://computer.org/cise: is out and has a Python theme. Many folks we 
know and love from the community and mailing lists contribute to the 
issue. Read articles by Paul Dubois and Travis Oliphant for free online.
On 2007年4月25日, Mark Bakker apparently wrote: 
> it would make a lot of sense if pylab functions 
> do the same thing as numpy functions. 
Yes. This should be the default.
Backward compatability can be provided
via numpy's compatability module.
A user's view,
Alan Isaac
From: Mark B. <ma...@gm...> - 2007年04月25日 13:54:31
Well, if I can cast a vote, it would make a lot of sense if pylab functions
do the same thing as numpy functions. Right now it is exceedingly confusing
when I teach, that zeros() could be integers or floats. An rc parameter
where we would import straight from numpy would be most excellent. Can't
wait!
Thanks for the explanations,
Mark
On 4/24/07, Eric Firing <ef...@ha...> wrote:
>
> Gary Ruben wrote:
> > Hi Mark,
> > this thread may help:
> >
> http://thread.gmane.org/gmane.comp.python.numeric.general/13399/focus=13421
> >
> > Essentially, pylab uses a compatibility layer to ease the task of
> > supporting the three array packages - currently this uses the Numeric
> > version of the ones and zeros functions giving the behaviour you observe
> > - this will be fixed when pylab drops support for the older packages,
> > which should be soon.
>
> What we will do is drop the use of numerix internally, but the numerix
> module will almost certainly remain, presumably with the Numeric and
> numarray support removed; so numerix will still use numpy's own
> "oldnumeric" compatibility layer, and I expect pylab will still import
> from it--at least, by default. The intention is to avoid breaking
> things unnecessarily. I can imagine possible variations, such as using
> an rc param to tell pylab whether to import from plain numpy or from
> oldnumeric, and splitting pylab into core pylab functions (figure, show,
> etc.) versus the convenience all-in-one namespace (mostly from numpy);
> but we will take one step at a time.
>
> Eric
>
> >
> > Gary R.
> >
> > Mark Bakker wrote:
> >> Hello list -
> >>
> >> I am confused about the part of numpy that pylab imports.
> >> Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as
> it
> >> returns integers by default, rather than floats.
> >> The same holds for 'ones' and 'empty'.
> >> Example:
> >> >>> from pylab import *
> >> >>> zeros(3)
> >> array([0, 0, 0])
> >> >>> from numpy import *
> >> >>> zeros(3)
> >> array([ 0., 0., 0.])
> >>
> >> Can this be fixed? Any explanation how this happens? Pylab just imports
> >> part of numpy, doesn't it?
> >>
> >> Thanks,
> >>
> >> Mark
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
1 message has been excluded from this view by a project administrator.

Showing results of 318

<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)
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 によって変換されたページ (->オリジナル) /