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

Showing 11 results of 11

From: Benjamin R. <ben...@ou...> - 2010年07月08日 22:16:36
Yes, I believe so. I believe it is possible to create the axes with
navigation disabled so that their callbacks are never connected. Then, you
can use the same callback system to trigger the axes pan and zoom on your
own controls.
http://matplotlib.sourceforge.net/users/event_handling.html
http://matplotlib.sourceforge.net/api/axes_api.html
(particularly about disconnect() and drag_pan() and friends).
Maybe someone else knows of an example?
Ben Root
On Thu, Jul 8, 2010 at 4:55 PM, German Ocampo <ger...@gm...> wrote:
> Good afternoon
>
> I'm working in an application with a simple figure embbebed in a QT
> Dialog. I want to instead of use the navigation toolbar of matplotlib,
> have some Qt push buttons in the form, that allow to perform the Zoom
> and Pan. Is it possible to do it?
>
> Many thanks for your help
>
> German
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Shir J. L. <Shi...@tu...> - 2010年07月08日 22:06:11
Hello,
I keep getting the error "ValueError: Need more than 1 value to unpack" 
every time I try to use the line ax.plot_wireframe(myArray[:,0], 
myArray[:,1], myArray[:,2])
What does that error mean?
Thanks,
Shir
From: German O. <ger...@gm...> - 2010年07月08日 21:55:51
Good afternoon
I'm working in an application with a simple figure embbebed in a QT
Dialog. I want to instead of use the navigation toolbar of matplotlib,
have some Qt push buttons in the form, that allow to perform the Zoom
and Pan. Is it possible to do it?
Many thanks for your help
German
From: Russell E. O. <ro...@uw...> - 2010年07月08日 19:25:20
In article <0D8...@gm...>,
 Edward Barnard <edb...@gm...> 
 wrote:
> Hi All
> 
> I had a problem installing matplotlib 1.0.0 on MacOS X 10.6 using python.org 
> 2.6.5 with the binary installer (dmg). When importing pylab, datautils was 
> missing. I fixed that by easy_installing python-dateutils, but it seems like 
> it should be included in the installer or listed in the install requirements.
> 
> Thanks for a great piece of software!
> 
> -Ed
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
I built the installer without dateutil and pytz packages.
At John Hunter's request I made new installers that do install these 
packages. I believe the new installers are now being served, so try 
downloading the installer and running it again.
Beware: the new installer always installs the versions it has; if you 
have a newer pytz or dateutil you want to keep, reinstall it afterwards 
or move it out of site-packages during the matplotlib install.
From: Russell E. O. <ro...@uw...> - 2010年07月08日 19:20:25
In article <A94...@tu...>,
 Shir Livne <shi...@tu...> wrote:
> Hi,
> 
> I downloaded the files from the site, but when i type "import 
> matplotlib" in python, it responds with "ImportError: No module named 
> matplotlib"
> 
> Does anyone mind going through the download steps for me? I probably 
> forgot something simple.
What file did you download?
If it was a binary installer, then which python are you using (open a 
Terminal and type "which python"). You should see a path starting with 
/Library, NOT with /System/Library.
If the path starts with /System/Library then that explains your problem: 
you are using the built-in python instead of the python from python.org 
(though the binary *may* work with other 3rd party pythons as well, e.g. 
Enthought or ActiveState).
So, the steps are:
- Download and install a suitable python from <http://python.org> (I 
recommend 2.6.x, but 2.5.x is also fine; we don't have a matplotlib 
binary for 2.7 yet because it is so new)
- Download and install the matching matplotlib Mac binary (for Python 
2.5 or 2.6).
Regards,
-- Russell
From: John H. <jd...@gm...> - 2010年07月08日 19:02:37
On Thu, Jul 8, 2010 at 5:50 AM, Karianne Holhjem
<kar...@as...> wrote:
> Hi,
>
> I'm having trouble getting pyplot and pylab to work on my Mac v.10.4.11
> (Tiger). I've tried searching in both google and different macusers
> forums, but haven't found an answer to my problems. If I have overlooked a
> webpage please send me a link to the solution.
>
> To download matplotlib I have downloaded the dmg package from the official
> matplotlib page
> http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/
>
> and it seems to install fine. However, I cannot use neither pyplot nor
> pylab:
You're on the right track with the debugging information you are
trying to provide. One problem is in your script bla.py. You do
 import matplotlib as mpl
 import mpl.pyplot
 import mpl.pylab
but you need to do
 import matplotlib as mpl
 import matplotlib.pyplot
 import matplotlib.pylab
This won't fix your segfault, but it may help you get get better
debugging information.
My first guess is a numpy version conflict -- what version are you
running? You can check the version requirements of the OSX installer
in the README that is provides. Many recent versions of numpy are not
ABI compatible, unfortunately.
JDH
From: Jeremy C. <jlc...@gm...> - 2010年07月08日 14:41:34
On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root <ben...@ou...> wrote:
> Jeremy,
>
> The pcolor function can take a vmin and a vmax parameter if you wish to
> control the colorscaling. In addition, you can use a special array
> structure called a "masked array" to have pcolor ignore "special" values.
> Assuming your data is 'vals':
>
> vals_masked = numpy.ma.masked_array(vals, vals == 0.0)
>
> Note that depending on your situation, doing an equality with with a
> floating point value probably isn't very reliable, so be sure to test and
> modify to suit your needs. 'vals_masked' can then be passed to pcolor
> instead of vals.
Yes, I think this is exactly what I need. Thanks!
Jeremy
From: Scott S. <sco...@gm...> - 2010年07月08日 11:47:10
Caught by the default Reply-to...
---------- Forwarded message ----------
From: Scott Sinclair <sco...@gm...>
Date: 8 July 2010 13:46
Subject: Re: [Matplotlib-users] plotting irregular spaced data
To: Ross Williamson <ros...@gm...>
>On 8 July 2010 00:15, Ross Williamson <ros...@gm...> wrote:
> I have a set of 2d data (2d array) z
> (100x100) which I need to plot - I have a nominal set of x and y
> positions say:
>
> x = linspace(0,100)
> y = linspace(0,100)
>
> Now the actual positions of the points in z are given by the following:
>
> u,v = meshgrid(x,y)
>
> phi = arctan2(v,u)
> theta = arcsin(u/cos(phi))
>
> so I have three 2d arrays (100x100) which describe the postion
> (phi,theta) of the points in z
>
> How do I go about plotting these say using imshow?
If your z are actually values at points in (phi, theta), you might
find it easier to use scatter().
>>> import matplotlib.pyplot as plt
>>> plt.scatter(phi.ravel(), theta.ravel(), c=z.ravel(), edgecolors='none')
>>> plt.colorbar()
Cheers,
Scott
From: Karianne H. <kar...@as...> - 2010年07月08日 10:50:32
Hi,
I'm having trouble getting pyplot and pylab to work on my Mac v.10.4.11 
(Tiger). I've tried searching in both google and different macusers 
forums, but haven't found an answer to my problems. If I have overlooked a 
webpage please send me a link to the solution.
To download matplotlib I have downloaded the dmg package from the official 
matplotlib page
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/
and it seems to install fine. However, I cannot use neither pyplot nor 
pylab:
[kariannelap:~] karianne% python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib as mpl
>>> import mpl.pyplot
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named mpl.pyplot
>>> import mpl.pylab
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named mpl.pylab
>>> import pylab
Bus error
I tried the clean rebuild and reinstall described on this page:
http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything
and re-installed without any change. So then I tried deleting all
matplotlib and pylab files and dirs and re-installed, again without
results. I also tried this installation method without success
easy_install matplotlib
Processing matplotlib
error: Not a recognized archive type: matplotlib
Some more info:
[kariannelap:~] karianne% uname -a
Darwin karianneholhjem.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu
-792.25.20~1/RELEASE_I386 i386 i386
[kariannelap:~] karianne% python -c 'import matplotlib; print 
matplotlib.__version__'
1.0.0
Regarding the matplotlibrc file I have tried both the default
backend : TkAgg
as well as
backend : WxAgg
since some webpages indicated that might be a problem.
Finally, I wrote a little script called bla.py
import matplotlib as mpl
import mpl.pyplot
import mpl.pylab
and ran it
[kariannelap:~] karianne% python bla.py --verbose-helpful
$HOME=/Users/karianne
CONFIGDIR=/Users/karianne/.matplotlib
matplotlib data path 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matpl
otlib/mpl-data
loaded rc file 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/
mpl-data/matplotlibrc
matplotlib version 1.0.0
verbose.level helpful
interactive is False
units is False
platform is darwin
Traceback (most recent call last):
 File "bla.py", line 2, in <module>
 import mpl.pyplot
ImportError: No module named mpl.pyplot
When commenting out line 2 in the scrip this is the output I got:
$HOME=/Users/karianne
CONFIGDIR=/Users/karianne/.matplotlib
matplotlib data path 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matpl
otlib/mpl-data
loaded rc file 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/
mpl-data/matplotlibrc
matplotlib version 1.0.0
verbose.level helpful
interactive is False
units is False
platform is darwin
Traceback (most recent call last):
 File "bla.py", line 3, in <module>
 import mpl.pylab
ImportError: No module named mpl.pylab
Can someone please tell me what I am doing wrong or which files I should 
delete to make this work? I have had bad experiences with fink so I prefer 
not using it.
cheers,
Karianne
From: Savas S. <sal...@gm...> - 2010年07月08日 09:30:09
Thanks that was it.
Cleared it all out and installed tk-dev.
Then it came up with a error about unable to find -ltk8.5. Checked whether I
had tk8.5 installed and that was fine so I installed tk8.5-dev.
Cleaned again recompiled and it all seems to be fine.
Thanks
>
From: Scott S. <sco...@gm...> - 2010年07月08日 05:46:52
>On 7 July 2010 19:02, Eric Firing <ef...@ha...> wrote:
> On 07/07/2010 05:01 AM, Benjamin Root wrote:
>> Samuel,
>>
>> Fortunately, matplotlib keeps all of the files that it compiles with the
>> python files that it installs. On Ubuntu, I believe that the
>> installation directory was /usr/lib/python2.?/dist-packages/matplotlib*
>
> ubuntu 8.04 was still using site-packages; the switch to dist-packages
> was in 9.10, if I remember correctly. 8.04 uses python 2.5.
>
> Also check the /usr/local path along with the /usr path. I'm not sure
> whether the installation from source put things by default in /usr or
> /usr/local.
You can check where your matplotlib is installed with
$ python -c "import matplotlib; print matplotlib"
Cheers,
Scott

Showing 11 results of 11

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