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


Showing 9 results of 9

From: Eric F. <ef...@ha...> - 2006年08月14日 23:47:47
Support for nan in inputs to matplotlib is presently spotty (and mostly 
accidental); use masked arrays instead. Masked arrays have been 
supported by contourf for a long time, but I added masked array support 
to quiver (and only for u and v, not for x and y) only very recently, so 
 until a new release is made (probably very soon) it will be available 
only in svn.
To make a masked array from your array with nans, do something like this:
import pylab as P
um = P.nx.ma.masked_where(P.nx.isnan(u), u)
It might make sense to have matplotlib argument handling code do this 
automatically on all arguments that can be masked arrays, but unless or 
until we make that change, you will have to to it manually as needed.
Eric
Dwishen Ramanah wrote:
> Dear all,
> 
> I have to quiver(x,y,u,v) , where u,v are displacement vectors and x,y 
> their position.
> I also have to contourf(x,y,u)
> 
> u and v have some nan elements. how does matplotlib handle nans because it 
> returns this error:
> 
> ValueError: math domain error
> 
> Thanks
> 
> Dwishen
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Dwishen R. <s40...@st...> - 2006年08月14日 23:26:52
Dear all,
I have to quiver(x,y,u,v) , where u,v are displacement vectors and x,y 
their position.
I also have to contourf(x,y,u)
u and v have some nan elements. how does matplotlib handle nans because it 
returns this error:
ValueError: math domain error
Thanks
Dwishen
From: Stefan v. d. W. <st...@su...> - 2006年08月14日 23:24:29
On Mon, Aug 14, 2006 at 11:12:29AM -0700, Christopher Barker wrote:
> Another (or additional) option is for both MPL and wx to support the ne=
w=20
> array interface protocol in numpy. There's a lot of other reasons to do=
=20
> that, and, again, Robin has expressed his support for this. If we could=
=20
> get MPL, wx, numpy, and PIL all passing data around with this protocol,=
=20
> we'd be in great shape. Travis posted a patch to PIL for support a whil=
e=20
> back, I don't know if it's going to get applied or not, but it's worth=20
> looking at.
Looks like it has been added already. From
http://effbot.org/zone/pil-changes-116.htm
- Added "fromarray" function, which takes an object implementing the
 NumPy array interface and creates a PIL Image from it. (from Travis
 Oliphant).
- Added NumPy array interface support (__array_interface__) to the
 Image class (based on code by Travis Oliphant). This allows you to
 easily convert between PIL image memories and NumPy arrays:
import numpy, Image
i =3D Image.open('lena.jpg')
a =3D numpy.asarray(i) # a is readonly
i =3D Image.fromarray(a)
Regards
St=E9fan
From: Daniel K. <kor...@re...> - 2006年08月14日 21:08:23
Hey guys:
Is there a way of hiding the mouse pointer in wxcursor_demo.py ?
I just want to keep cursor and do away with the mouse pointer.
I want to use it for ROI selection over an image, so the mouse pointer 
gets in the way.
I am so desperate that I even tried SetCursor() knowing it would not 
work ...
 Daniel
From: Christopher B. <Chr...@no...> - 2006年08月14日 21:05:53
Kenny Ortmann wrote:
> I am not sure if this would be the right place to ask this question
this is more of a wxPython question than an MPL one, so you might have 
more luck on wxPython-users.
> My problem is when i go to destroy the first Graph panel, because there is
How are you doing that? for the most part, you don't need (and 
shouldn't) destroy a wxPython window by hand -- let Python's garbage 
collection take care of it.
If you're a bit more specific as to what you need to do, perhaps someone 
could suggest another way.
Try to trim this down to the smallest possible example, make that a 
stand-alone application, post that, and we should be able to help.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Kenny O. <ya...@em...> - 2006年08月14日 20:30:41
I am not sure if this would be the right place to ask this question but I
figure there is no harm in asking and if it is the wrong place then just
disregard the questoin.
I am working with 3 seperate panels in a wx.Frame. One panel is used as a
status bar at the bottom displaying data. One of the panels is used as a
custom toolbar on the left side and the other Panel is used for multiple
things, collecting user info, which is displayed at the bottom and then
displaying a graph of data from a file, where the user has to chose
segments of the data, and then the graph needs to be redrawn.
My problem is when i go to destroy the first Graph panel, because there is
user input in between the first and second Graph, i get this error.
Traceback (most recent call last):
 File "c:\python23\lib\site-packages\wxmpl.py", line 1102, in OnActivate
 self.cursor.setNormal()
 File "C:\PYTHON23\Lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line
13485, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the PlotPanel object has been
deleted, attribute access no longer allowed.
This only happens when I have clicked the exit button or the File, exit on
themenu, and the Exit dialog pops up. When i click yes, this error prints
out
Traceback (most recent call last):
 File "c:\python23\lib\site-packages\wxmpl.py", line 1102, in OnActivate
 self.cursor.setNormal()
 File "C:\PYTHON23\Lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line
13485, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the PlotPanel object has been
deleted, attribute access no longer allowed.
Traceback (most recent call last):
 File "c:\python23\lib\site-packages\wxmpl.py", line 1102, in OnActivate
 self.cursor.setNormal()
 File "C:\PYTHON23\Lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line
13485, in __getattr__
 raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the PlotPanel object has been
deleted, attribute access no longer allowed.
Is anyone familiar with these or how i could get rid of them?
From: Christopher B. <Chr...@no...> - 2006年08月14日 18:12:38
John Hunter wrote:
> Charlie, since you are pretty familiar with the blitting API, perhaps
> you could take a look and see how much work it would be to do wx
> blitting w/o extension code. I'd be happy to add some additional
> helper methods in agg if need be, as we did for qt.
Didn't MPL originally use the Python API, but with less than stellar 
performance? I'm not sure how efficient we can get without making 
changes to wx. However, I think Robin Dunn is pretty open to making some 
of those changes.
For one, he told me a while back that he was going to try to expose some 
of the API for working directly with wxBitmaps. If we could dump data 
straight into a wxBitmap, that would be the best option. That's likely 
to be tricky, however, as a wxBitmap is a wrapper around whatever the 
platform-native format is for a Bitmap. However, while there are a lot 
of possible formats for native Bitmaps, 24bit RGB is pretty darn common, 
if we could get top performance from that from that format, we'd be a 
long way in the right direction.
Another (or additional) option is for both MPL and wx to support the new 
array interface protocol in numpy. There's a lot of other reasons to do 
that, and, again, Robin has expressed his support for this. If we could 
get MPL, wx, numpy, and PIL all passing data around with this protocol, 
we'd be in great shape. Travis posted a patch to PIL for support a while 
back, I don't know if it's going to get applied or not, but it's worth 
looking at.
Another place to look for idea is Enthought's Kiva -- It's Agg back-end 
interacts well with wx -- or so I've heard. I haven't tried it yet myself.
I'm no C++ wiz, but I'd be willing to help with the wx modifications -- 
it's been on my list for a while. Should I send a note to Robin Dunn for 
ideas?
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Charlie M. <cw...@gm...> - 2006年08月14日 11:35:19
Check out the py2exe page about matplotlib.
http://starship.python.net/crew/theller/moin.cgi/MatPlotLib
On 8/14/06, Christian Meesters <mee...@un...> wrote:
> Hi,
>
> Yesterday I tried packing an application of mine which makes use of wxPython,
> scipy, and matplotlib with cx_Freeze.
>
> The Traceback I get after running FreezePython --install-dir SPlot_dir
> SPlot.py and starting the application is:
>
> Traceback (most recent call last):
> File "/home/cm/bin/initscripts/Console.py", line 27, in ?
> exec code in m.__dict__
> File "SPlot.py", line 17, in ?
> File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 720,
> in ?
> defaultParams = {
> File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 273,
> in wrapper
> ret = func(*args, **kwargs)
> File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 360,
> in _get_data_path
> raise RuntimeError('Could not find the matplotlib data files')
> RuntimeError: Could not find the matplotlib data files
>
> I should mention that the everything was done on one machine (running SuSE
> 10.0 and python 2.4.1).
>
> Anyone tried packing an application with matplotlib before and has a hint for
> me what to change?
>
> TIA
> Christian
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Christian M. <mee...@un...> - 2006年08月14日 08:41:21
Hi,
Yesterday I tried packing an application of mine which makes use of wxPython, 
scipy, and matplotlib with cx_Freeze.
The Traceback I get after running FreezePython --install-dir SPlot_dir 
SPlot.py and starting the application is:
Traceback (most recent call last):
 File "/home/cm/bin/initscripts/Console.py", line 27, in ?
 exec code in m.__dict__
 File "SPlot.py", line 17, in ?
 File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 720, 
in ?
 defaultParams = {
 File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 273, 
in wrapper
 ret = func(*args, **kwargs)
 File "/usr/lib64/python2.4/site-packages/matplotlib/__init__.py", line 360, 
in _get_data_path
 raise RuntimeError('Could not find the matplotlib data files')
RuntimeError: Could not find the matplotlib data files
I should mention that the everything was done on one machine (running SuSE 
10.0 and python 2.4.1).
Anyone tried packing an application with matplotlib before and has a hint for 
me what to change? 
TIA
Christian

Showing 9 results of 9

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