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






Showing results of 322

<< < 1 .. 7 8 9 10 11 .. 13 > >> (Page 9 of 13)
From: Michael D. <md...@st...> - 2008年08月07日 17:00:35
I'm not aware of the problem (but I'm not a regular wxmpl user).
 From 0.91 to 0.98, a major refactoring was done to make it easier to 
add new kinds of projections. So PolarAxes is no longer a special case, 
it is just one of many possible non-Cartesian projections. 
Unfortunately to do this, the API had to change in a number of places. 
These are documented in the API_CHANGES file in the "TRANSFORMS 
REFACTORING" section.
wxmpl needs to be updated based on those instructions in order to be 
compatible with mpl 0.98. Hopefully that process won't be too 
difficult, but it's hard to say without trying. basemap, a fairly large 
mpl toolkit, was able to handle the transition fairly smoothly.
Let me know if I can be of further assistance.
Cheers,
Mike
massimo sandal wrote:
> Hi,
>
> Sorry if bothering you. Here we use a software (that I've written) 
> that is based on wxmpl and matplotlib, among other things. A collegue 
> of mine noticed a problem when installing it on Windows, with the 
> following error:
>
> File "hooke.py", line 21, in <module>
> import wxmpl
> File "C:\Python25\lib\site-packages\wxmpl.py", line 26, in <module>
> from matplotlib.axes import PolarAxes, _process_plot_var_args
> ImportError: cannot import name PolarAxes
>
> He was using matplotlib 0.98.3 .Downgrading to 0.91 solved the issue.
> I remember the same happened when, some month ago, I tried to install 
> the same software on OS X using what were basically SVN versions of 
> mpl, labeled "0.98pre" (see http://macinscience.org/?page_id=6 )
>
> I guess you are probably aware of the problem: are you already working 
> on it :) ? Is there any workaround?
>
> I'd like to help you patching it, if within my skills, but I'd need 
> some direction on how the mpl API have been updated.
>
> m.
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: stuartornum <st...@mu...> - 2008年08月07日 16:39:00
That looks perfect, how did you do it?
Thanks
kippertoffee wrote:
> 
> here's an example of pcolormesh on a random 10x10 array
> 
> http://www.nabble.com/file/p18874393/spam2.png 
> 
> 
> stuartornum wrote:
>> 
>> Hi Pete,
>> 
>> Thanks for the quick response.
>> 
>> Will imshow() actually plot the graph?
>> 
>> Do I not need to do something like:
>> 
>> contourf(X, Y, Z, levels)
>> 
>> Thanks
>> 
> 
> 
-- 
View this message in context: http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18874605.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: massimo s. <mas...@un...> - 2008年08月07日 16:30:08
Attachments: massimo_sandal.vcf
Hi,
Sorry if bothering you. Here we use a software (that I've written) that 
is based on wxmpl and matplotlib, among other things. A collegue of mine 
noticed a problem when installing it on Windows, with the following error:
 File "hooke.py", line 21, in <module>
 import wxmpl
 File "C:\Python25\lib\site-packages\wxmpl.py", line 26, in <module>
 from matplotlib.axes import PolarAxes, _process_plot_var_args
ImportError: cannot import name PolarAxes
He was using matplotlib 0.98.3 .Downgrading to 0.91 solved the issue.
I remember the same happened when, some month ago, I tried to install 
the same software on OS X using what were basically SVN versions of mpl, 
labeled "0.98pre" (see http://macinscience.org/?page_id=6 )
I guess you are probably aware of the problem: are you already working 
on it :) ? Is there any workaround?
I'd like to help you patching it, if within my skills, but I'd need some 
direction on how the mpl API have been updated.
m.
-- 
Massimo Sandal , Ph.D.
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
mas...@un...
web:
http://www.biocfarm.unibo.it/samori/people/sandal.html
tel: +39-051-2094388
fax: +39-051-2094387
From: kippertoffee <fly...@go...> - 2008年08月07日 16:26:46
here's an example of pcolormesh on a random 10x10 array
http://www.nabble.com/file/p18874393/spam2.png 
stuartornum wrote:
> 
> Hi Pete,
> 
> Thanks for the quick response.
> 
> Will imshow() actually plot the graph?
> 
> Do I not need to do something like:
> 
> contourf(X, Y, Z, levels)
> 
> Thanks
> 
-- 
View this message in context: http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18874393.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Ben A. <bax...@co...> - 2008年08月07日 16:26:01
What is the difference between setting clip_on and clip_box? For an annotation, there does not appear to be any difference. But if I give the annotation a bbox, then only clip_box works to clip the box at the axes boundary. The example below demonstrates:
from matplotlib.pyplot import figure, show
fig = figure()
ax = fig.add_subplot(111)
ax.annotate('This is a long annotation',
 xy=(1, 1),
 clip_on=True,
 bbox=dict(facecolor = 'white',
 clip_on=True))
 #clip_box = ax.bbox))
ax.set_xlim(-5, 2.8)
ax.set_ylim(-5, 5)
show()
PS. I am using MPL 0.98.3.
From: stuartornum <st...@mu...> - 2008年08月07日 16:19:11
Hi Pete,
Thanks for the quick response.
Will imshow() actually plot the graph?
Do I not need to do something like:
contourf(X, Y, Z, levels)
Thanks
-- 
View this message in context: http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18874222.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Chris B. <Chr...@no...> - 2008年08月07日 16:03:36
> On Wed, Aug 6, 2008 at 5:02 PM, Richard Lawrence <rw...@ps...> wrote:
>> My setup is:
>> Mac Pro PPC G5, OS X 10.5.4
>> Python 2.5.1 (Apple build)
>> Numpy 1.2.0.dev5615 -- ran svn update and rebuilt this morning
>> REQUIRED DEPENDENCIES
>> ~ * numpy 1.1 or later is required; you have
>> ~ * 1.0.5.dev4673
Apple distributed a version of numpy with the system python, and set up 
sys.path so that their stuff would be found before site-packages, so you 
may be getting Apple's version of numpy rather than the one you built 
and installed. (I'm not running 10.5, so I can't supply details)
There are ways to work around this -- a little googling should help you 
figure it out, but I recommend that you avoid the whole problem (and 
others) by installing python.org's build of 2.5.2, and go from there -- 
the binaries on the numpy site are built for that version.
-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: peter w. <fly...@go...> - 2008年08月07日 15:32:37
Someone more knowlegeable than me may corrct me here, but the code for
getting your data into a grid could be greatly simplified to:
X = array([0,1,2,3,4,5,6,7,8,9,])
Y = array([0,1,2,3,4,5,6,7,8,9,])
Z = ListValues.reshape(10,10)
than you could use something like imshow() to show the data without any
interpolation.
Pete.
2008年8月7日 stuartornum <st...@mu...>
>
> Hi,
>
> I have been using matplotlib for about 2 weeks now. I thought it would be
> good to try plotting heatmaps to show some data.
>
> The idea:
>
> I have 100 values all ranging from 0.00 to 1.00, I would like to create a
> graph with a 10 by 10 grid. Therefore each value has 1 section of the grid.
>
> So, for example if the value was 0.10, the colour would be blue, or if
> 0.95,
> the colour red.
>
> Now the problem is I do not know how to access each individual grid
> position, I guess I would have some form of counter system to count 0 -> 9
> on the X axis and 0 -> 9 on the Y also.
>
> Here is my pseudo code:
>
> ##########################################
>
> Count1 = 0 ## For the X axis
> Count2 = 0 ## For the Y axis
> Max = 0 ## To count 0 - 99
>
> ListValues = [0.11, 0.09, 0.34, 0.44, 0.29,.... all the way to 100 values]
>
> while Max < 100:
>
> if Count1 == 10:
> Count2 = Count2 + 1 ## Increase the Y axis by one
> Count1 = 0 ## If X axis counter = 10, reset
> it to 0
> else:
> GridPosition = []
> GridPosition.append(Count1)
> GridPosition.append(Count2)
> GridValue = ListValues[Max]
>
> # Now armed with the GridPosition and GridValue, im stuck on
> how to plot the square...
>
> ##########################################
>
> So as you can see from above, I have the data ready to fill the relevant
> grid position, just unsure on how to actually do it!
>
> Just to clarify, this is a heatmap, so the GridValue should correspond to a
> colour and fill that particular square with the colour from the colorbar
> i.e.
>
> levels = arange(0.0, 1.0, 0.025)
>
> Thank you in advance for any help.
> --
> View this message in context:
> http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18872991.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: stuartornum <st...@mu...> - 2008年08月07日 15:23:54
Hi,
I have been using matplotlib for about 2 weeks now. I thought it would be
good to try plotting heatmaps to show some data.
The idea:
I have 100 values all ranging from 0.00 to 1.00, I would like to create a
graph with a 10 by 10 grid. Therefore each value has 1 section of the grid.
So, for example if the value was 0.10, the colour would be blue, or if 0.95,
the colour red.
Now the problem is I do not know how to access each individual grid
position, I guess I would have some form of counter system to count 0 -> 9
on the X axis and 0 -> 9 on the Y also.
Here is my pseudo code:
##########################################
Count1 = 0 ## For the X axis
Count2 = 0 ## For the Y axis
Max = 0 ## To count 0 - 99
ListValues = [0.11, 0.09, 0.34, 0.44, 0.29,.... all the way to 100 values]
while Max < 100:
	if Count1 == 10: 
		Count2 = Count2 + 1 ## Increase the Y axis by one
		Count1 = 0 ## If X axis counter = 10, reset it to 0
	else:
		GridPosition = []
 GridPosition.append(Count1)
 GridPosition.append(Count2)
 GridValue = ListValues[Max]
		
 # Now armed with the GridPosition and GridValue, im stuck on
how to plot the square...
##########################################
So as you can see from above, I have the data ready to fill the relevant
grid position, just unsure on how to actually do it!
Just to clarify, this is a heatmap, so the GridValue should correspond to a
colour and fill that particular square with the colour from the colorbar
i.e.
levels = arange(0.0, 1.0, 0.025)
Thank you in advance for any help.
-- 
View this message in context: http://www.nabble.com/Contour-Contourf-Plot-Heatmap---Grid---Multiple-Items-tp18872991p18872991.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Richard L. <rw...@ps...> - 2008年08月07日 14:17:37
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John,
Thanks for your help.
|
| Most likely there is another version of numpy on your system that easy
| install is picking up (multiple versions of python perhaps?). You
| might try to find them with
|
| > find / -name numpy -type d
|
Indeed, this did turn up another installation, and I am now searching
for a third, even older one. I wish I understood the layout of /Library
better...or that there was only a single site-packages directory for
each version of Python :) Once I weed them all out, I will give the egg
another shot. I would still like to be able to build it from source,
though, so I can stay up to date.
| Did you edit setupext.py to remove the basedir settings ans Charlie
| recommended? Also, let's make sure that the files in your ld path are
| there and of the right type? What does
|
| > file /usr/local/src/mpl-build/libpng-1.2.29/libpng*
|
| return?
I did in fact edit setupext.py, and the 'darwin' key of basedir is set
to an empty list. The file command does report universal binaries for
libpng*; the relevant output lines are:
libpng-1.2.29/libpng.a: Mach-O universal binary with 2
architectures
libpng-1.2.29/libpng.a (for architecture i386):	current ar archive
random library
libpng-1.2.29/libpng.a (for architecture ppc):	current ar archive random
library
(There are similar messages for the various .o and .lo files.)
| One other option is to try following the build instructions I posted
| at http://ipython.scipy.org/moin/Py4Science/InstallationOSX
Actually, the reason I went with the "whole hog" method of compiling
libpng and freetype from source was that I was running into a similar
architecture error when I tried compiling against the freetype and
libpng in /usr/X11R6. Perhaps there is some deeper include path issue
that I can't see?
- --
Richard Lawrence
Research Coordinator
Computational Memory Lab
rw...@ps...
215-746-0407
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkibA/QACgkQCWv7yMGrSa/s0gCfe5/0oyGIHWq+z7cNuJc1lYaJ
unwAniu5qwOwTXaKpjegPjnX5PBBJTlP
=RUYR
-----END PGP SIGNATURE-----
From: Grégory L. <gre...@ff...> - 2008年08月07日 08:28:28
Hello everybody,
we are looking for the best way to plot a waterfall diagram in
Matplotlib. The 2 functions which could be used 
to do that are (as far as I have found) imshow and pcolormesh. Here is a
small script that use both to compare the output:
-----------------
from pylab import *
delta = 0.2
x = arange(-3.0, 3.0, delta)
y = arange(-2.0, 2.0, delta)
X, Y = meshgrid(x, y)
Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)
figure(1)
im = imshow(Z,extent=(-3,3,-2,2))
CS = contour(X, -Y, Z, 6,
 colors='k', # negative contours will be dashed by default
 )
clabel(CS, fontsize=9, inline=1)
title('Using imshow')
figure(2)
im = pcolormesh(X,-Y,Z)
CS = contour(X, -Y, Z, 6,
 colors='k', # negative contours will be dashed by default
 )
clabel(CS, fontsize=9, inline=1)
title('Using pcolormesh')
show()
---------------------
The problem is that we need some of the flexibility of pcolormesh (which
is able to map the matrix of value on any deformed mesh), while
we would like to use the interpolations available in imshow (which
explain why the imshow version is much "smoother" than the pcolormesh
one).
In fact, what would be needed is not the full flexibility of pacolormesh
(which can map the grid to any kind of shape), we "only" have to deal
with rectangular grids
with irregularly spaced x- and y- graduations.
Is there a drawing function in Matplotlib which would be able to work
with such a rectangular non-uniform grid?
And if not, what about an extension of imshow which would work as this:
 
im = imshow(Z,x_gridpos=x, y_gridpos=y) #specify explicitely the
position of the grid's node, instead of giving the extend and assuming
uniform spacing.
Longer term, would a pcolormesh accepting interpolation be possible? The
current behavior, averaging the color of the grids node to get a uniform
cell color, 
is quite rough except for a large number of cells...And even then, it
soon shows when you zoom in...
The best would be to allow the same interpolations as in imshow (or a
subset of it), and also allows to use interpolation before colormap
lookup (or after), 
like in Matlab. Indeed, Matlab allows to finely tune interpolation by
specifying Gouraud (interpolation after color
lookup)/Phong(interpolation before color lookup, i.e. for each pixel).
Phong is usually much better but also more CPU intensive. Phong is
especially when using discrete colormap, producing banded colors
equivalent to countour lines, while Gouraud does not work in those
cases.
Of course, the performance will be impacted by some of those
interpolation options, which would degrade performance in animations for
example.... but I think that having the different options available
would be very useful, it allows to have the highest map quality, or have
a "quick and dirty" map depending on situation (grid spacing, type of
map, animation or not, ...).
Best regards,
Greg.
From: Elfnor <el...@gm...> - 2008年08月07日 03:07:08
In the following code the displayed image is initially displayed with axes
going from 0 to 103, ie there is no white space between the image and the
axes. 
After the first ginput mouse click the axes limits change to -20 to 120 with
white space between the image and the axes. This is a little disconcerting
if the user is trying to accurately pick points on an image. 
if I use ax1.axis('off') the white space disappears but the image changes
size. How do I fix the image size so ginput dosen't rescale it. 
import pylab
x1 = pylab.rand(103, 103)
fig1 = pylab.figure(1)
ax1 = fig1.add_subplot(111)
ax1.imshow(x1)
x = fig1.ginput(2)
fig1.show()
-- 
View this message in context: http://www.nabble.com/ginput-changes-axes-limits-tp18863282p18863282.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John H. <jd...@gm...> - 2008年08月07日 00:41:59
On Wed, Aug 6, 2008 at 5:02 PM, Richard Lawrence <rw...@ps...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello everyone,
>
> I've had a heck of a time trying to install matplotlib. I've tried
> installing both from svn and from the pre-built 0.98.3 egg with no
> success. Any tips would be appreciated.
>
> My setup is:
> Mac Pro PPC G5, OS X 10.5.4
> Python 2.5.1 (Apple build)
> Numpy 1.2.0.dev5615 -- ran svn update and rebuilt this morning
> Scipy 0.7.0.dev4603 -- ran svn update and rebuilt this morning
>
> 1. Error with the SourceForge 0.98.3 egg for OS X:
> $ easy_install matplotlib-0.98.3-py2.5-macosx-10.3.egg
> [snip]
> REQUIRED DEPENDENCIES
> ~ * numpy 1.1 or later is required; you have
> ~ * 1.0.5.dev4673
> error: Setup script exited with 1
>
> As far as I know, numpy 1.0.5.dev4673 was never installed on this
> machine. Running python and checking numpy.__version__ gives the
> version string listed above (1.2.etc.). I can't find any other versions
> on the system, and I don't know where the egg would be finding this
> phantom version.
Most likely there is another version of numpy on your system that easy
install is picking up (multiple versions of python perhaps?). You
might try to find them with
 > find / -name numpy -type d
> - -lfreetype -lz -lz -lstdc++ -lm -o
> build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
> - -Wl,-framework,CoreServices,-framework,ApplicationServices
> ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file
> is not of required architecture for architecture i386
> collect2: ld returned 1 exit status
> lipo: can't open input file:
> /var/folders/7h/7hHE3mwXHGCNGWujjUd1L++++U2/-Tmp-//ccS3ZBhp.out (No such
> file or directory)
> error: command 'g++' failed with exit status 1
>
> ~From this, it would seem that the build is attempting to use an external
> libpng, despite the fact that I built it from source without a problem,
> it's located in /usr/local/src/mpl-build/libpng-1.2.29, and:
>
> $ echo $CFLAGS
> - -arch ppc -arch i386 -I/usr/local/src/mpl-build/libpng-1.2.29
> - -I/usr/local/src/mpl-build/freetype-2.3.7/include
> $ echo $LDFLAGS
> - -arch ppc -arch i386 -L/usr/local/src/mpl-build/libpng-1.2.29
> - -L/usr/local/src/mpl-build/freetype-2.3.7
>
> What am I missing?
Did you edit setupext.py to remove the basedir settings ans Charlie
recommended? Also, let's make sure that the files in your ld path are
there and of the right type? What does
 > file /usr/local/src/mpl-build/libpng-1.2.29/libpng*
return?
> Any help would be greatly appreciated...I've played with this all day
> and made little progress.
One other option is to try following the build instructions I posted
at http://ipython.scipy.org/moin/Py4Science/InstallationOSX
From: Ben A. <bax...@co...> - 2008年08月06日 23:09:34
Try this:
 self.axes.set_yticks([])
________________________________
From: mat...@li... [mailto:mat...@li...] On Behalf Of "Jonathan Hayward, http://JonathansCorner.com"
Sent: Wednesday, August 06, 2008 4:38 PM
To: Matplotlib
Subject: [Matplotlib-users] Yticks off?
I am making a bar chart and want to turn off (visible) yticks. How can I remove, hide, color with white (the background color), etc., the yticks?
Thanks,
--
-- Jonathan Hayward, chr...@gm...<mailto:chr...@gm...>
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Jeff W. <js...@fa...> - 2008年08月06日 22:32:46
Zane Selvans wrote:
> Oh, great! I'm a dunce. I should really go through and put all the 
> Basemap examples into the Matplotlib cookbook so they come up when I 
> search for them on the web. Er, when somebody else searches for them 
> on the web... since I'd be familiar with all of them if I put them up!
>
> Is there some reason that many of the example files haven't been 
> updated to import basemap from the new mpl_toolkits.basemap instead of 
> the old matplotlib.toolkits.basemap? Or maybe my version of the 
> examples (0.99) isn't the most recent?
>
> Zane
Zane: All the examples do use mpl_toolkits, and have since the name was 
changed. You must have a very old copy (probably 0.9.9, not 0.99).
-Jeff
>
> On Aug 6, 2008, at 2:15 PM, Jeff Whitaker wrote:
>
>> Zane Selvans wrote:
>>> Has anyone here ever used Basemap to display 
>>> datasets/layers/features created using the OGR/GDAL libraries 
>>> (http://www.gdal.org/)? They're SWIG wrappers, not pure Python, so 
>>> I could see integration maybe being a pain. Just curious if there 
>>> was anything out there to build on already...
>>>
>>> Thanks!
>>>
>>> -- 
>>> Zane Selvans
>>> Amateur Earthling
>>> http://zaneselvans.org
>>> za...@id...
>>> 303/815-6866
>>> PGP Key: 55E0815F
>>>
>>>
>>
>> Zane: You can use Basemap to plot GIS data you've read in with 
>> ogr/gdal. There's an example included with basemap (testgdal.py). 
>> I'm not a gdal user, so I may be missing something - what sort of 
>> integration do you have in mind?
>>
>> -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-113
>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>
>
> -- 
> Zane Selvans
> Amateur Earthling
> http://zaneselvans.org
> za...@id...
> 303/815-6866
> PGP Key: 55E0815F
>
-- 
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-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: B C. <clo...@ya...> - 2008年08月06日 22:31:22
Ewald,
If you look at the following link it may help you get started:
http://code.google.com/p/subplot/source/browse/branches/mzViewer/PyMZViewer/mpl_custom_widget.py
What you need to do is make a ui with designer and then place a widget where ever you'd like. From there make sure you right click on the widget and select horizontal layout (This is to make sure the widget occupies the GUI fully). Then right click on the widget and click on "Promote to." From there what you need to do is select QWidget as the base class name. Using the example file I pointed to above you would put in "MPL_Widget" for the "Promoted class name" followed by "mpl_custom_widget" in the header file: field. Click promote and you should be done. Be sure to place the mpl_custom_widget.py in the directory of your converted ui file (i.e. the one that was created using pyuic4). Now from your main window file (the one that controls adding data to the plot) you simply need to use the name of widget you promoted followed by canvas.ax etc. to manipulate the plot. For example if your promoted widget name is "plotWidget" you should be able
 to access the mpl API using "self.plotWidget.canvas.ax.plot(x,y,*kwargs)" where x,y, and *kwargs are the appropriate numpy arrays and keyword arguments.
I hope that helps, and let me know if you need anythinge else.
Cheers,
Brian
--ps if you need the toolbar using the latest version of matplotlib you may have to uncomment some of the code and remove some of the arguments that locate the toolbar in the ui. 
--- On Wed, 8/6/08, Ewald Zietsman <ewa...@gm...> wrote:
From: Ewald Zietsman <ewa...@gm...>
Subject: Re: [Matplotlib-users] Using matplotlib in Qt4/Qt4 Designer
To: clo...@ya...
Date: Wednesday, August 6, 2008, 2:47 PM
Hi,
Sorry for replying only now. Thanks for the link. I'm very new to GUI programming. Can you please explain to me how to promote a mpl widget from a regular widget? In qt3 it was possible to create a mpl widget in the form by telling the form to import your module containing the widget definition (a python class). I'm working with the qwt widgets at the moment and although they're supposed to be fast, they don't seem to be much faster than mpl, unless I'm doing something funny which is possible. I'm not really a programmer, but I like to tinker in order to learn as much as I can so that I can create programs to solve astrophysical problems/analyse data more efficiently (less time/less code).
Cheers
Ewald
 
On Wed, Aug 6, 2008 at 12:46 AM, B Clowers <clo...@ya...> wrote:
>
> Ewald,
>
> It is very much a work in progress (and poorly named) but you can check out a project of mine:
>
> http://code.google.com/p/subplot/
>
> I created a custom matplotlib widget that you can promote from a regular widget in Designer. I hope it helps, let me know if you have any questions. The ui files are also included in the SVN. One thing to note there was a recent change to the Qt backend that altered the nature of the toolbar so you may want to comment that part out if you are using the latest matplotlib. If it is a must have I think I'm sure I could update the code when I find some time (Currently, I'm using v 0.91 I believe). Good luck.
>
> Cheers,
>
> Brian
>
> --- On Tue, 8/5/08, Ewald Zietsman <ewa...@gm...> wrote:
>
> From: Ewald Zietsman <ewa...@gm...>
> Subject: [Matplotlib-users] Using matplotlib in Qt4/Qt4 Designer
> To: mat...@li...
> Date: Tuesday, August 5, 2008, 10:06 AM
>
> Hi All,
>
> I'd like to use a matplotlib widget in a GUI app I'm working on. I have tried qwt but I know matplotlib a lot better and would like to use it instead. Is there anybody who have done this before? More specifically, does anyone know how to add a matplotlib widget as a custom widget in qt4 designer?
>
> Any help will be greatly appreciated,
>
> Ewald Zietsman
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
 
From: Zane S. <za...@id...> - 2008年08月06日 22:29:18
Oh, great! I'm a dunce. I should really go through and put all the 
Basemap examples into the Matplotlib cookbook so they come up when I 
search for them on the web. Er, when somebody else searches for them 
on the web... since I'd be familiar with all of them if I put them up!
Is there some reason that many of the example files haven't been 
updated to import basemap from the new mpl_toolkits.basemap instead of 
the old matplotlib.toolkits.basemap? Or maybe my version of the 
examples (0.99) isn't the most recent?
Zane
On Aug 6, 2008, at 2:15 PM, Jeff Whitaker wrote:
> Zane Selvans wrote:
>> Has anyone here ever used Basemap to display datasets/layers/ 
>> features created using the OGR/GDAL libraries (http://www.gdal.org/)? 
>> They're SWIG wrappers, not pure Python, so I could see 
>> integration maybe being a pain. Just curious if there was 
>> anything out there to build on already...
>>
>> Thanks!
>>
>> --
>> Zane Selvans
>> Amateur Earthling
>> http://zaneselvans.org
>> za...@id...
>> 303/815-6866
>> PGP Key: 55E0815F
>>
>>
>
> Zane: You can use Basemap to plot GIS data you've read in with ogr/ 
> gdal. There's an example included with basemap (testgdal.py). I'm 
> not a gdal user, so I may be missing something - what sort of 
> integration do you have in mind?
>
> -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-113
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>
--
Zane Selvans
Amateur Earthling
http://zaneselvans.org
za...@id...
303/815-6866
PGP Key: 55E0815F
From: Tim M. <tim...@gm...> - 2008年08月06日 22:25:09
Hello,
excuse the late reply.
But you may be interested in the timeseries scikit:
http://scipy.org/scipy/scikits/wiki/TimeSeries
http://www.scipy.org/Cookbook/TimeSeries/FAQ
Have success!
Kind regards,
Timmie
From: Richard L. <rw...@ps...> - 2008年08月06日 22:02:53
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello everyone,
I've had a heck of a time trying to install matplotlib. I've tried
installing both from svn and from the pre-built 0.98.3 egg with no
success. Any tips would be appreciated.
My setup is:
Mac Pro PPC G5, OS X 10.5.4
Python 2.5.1 (Apple build)
Numpy 1.2.0.dev5615 -- ran svn update and rebuilt this morning
Scipy 0.7.0.dev4603 -- ran svn update and rebuilt this morning
1. Error with the SourceForge 0.98.3 egg for OS X:
$ easy_install matplotlib-0.98.3-py2.5-macosx-10.3.egg
[snip]
REQUIRED DEPENDENCIES
~ * numpy 1.1 or later is required; you have
~ * 1.0.5.dev4673
error: Setup script exited with 1
As far as I know, numpy 1.0.5.dev4673 was never installed on this
machine. Running python and checking numpy.__version__ gives the
version string listed above (1.2.etc.). I can't find any other versions
on the system, and I don't know where the egg would be finding this
phantom version.
2. Error building from svn checkout, following the instructions at
http://ipython.scipy.org/moin/MatplotlibOSXBuildNotes:
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
- -bundle -undefined dynamic_lookup -arch ppc -arch i386
- -L/usr/local/src/mpl-build/libpng-1.2.29
- -L/usr/local/src/mpl-build/freetype-2.3.7 -arch ppc -arch i386
- -I/usr/local/src/mpl-build/libpng-1.2.29
- -I/usr/local/src/mpl-build/freetype-2.3.7/include
build/temp.macosx-10.3-fat-2.5/src/ft2font.o
build/temp.macosx-10.3-fat-2.5/src/mplutils.o
build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o
build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o
build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o
build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib
- -lfreetype -lz -lz -lstdc++ -lm -o
build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
- -Wl,-framework,CoreServices,-framework,ApplicationServices
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file
is not of required architecture for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/7h/7hHE3mwXHGCNGWujjUd1L++++U2/-Tmp-//ccS3ZBhp.out (No such
file or directory)
error: command 'g++' failed with exit status 1
~From this, it would seem that the build is attempting to use an external
libpng, despite the fact that I built it from source without a problem,
it's located in /usr/local/src/mpl-build/libpng-1.2.29, and:
$ echo $CFLAGS
- -arch ppc -arch i386 -I/usr/local/src/mpl-build/libpng-1.2.29
- -I/usr/local/src/mpl-build/freetype-2.3.7/include
$ echo $LDFLAGS
- -arch ppc -arch i386 -L/usr/local/src/mpl-build/libpng-1.2.29
- -L/usr/local/src/mpl-build/freetype-2.3.7
What am I missing?
Any help would be greatly appreciated...I've played with this all day
and made little progress.
Thanks!
- --
Richard Lawrence
Research Coordinator
Computational Memory Lab
rw...@ps...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiaH4EACgkQCWv7yMGrSa/1KACglZDbU2QjOXCY1tQ/Kqbqbfd0
1OwAn1hPnm0/mXwhZmbrAhq1FhMcHamy
=JJ49
-----END PGP SIGNATURE-----
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年08月06日 21:37:41
I am making a bar chart and want to turn off (visible) yticks. How can I
remove, hide, color with white (the background color), etc., the yticks?
Thanks,
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Jeff W. <js...@fa...> - 2008年08月06日 21:15:50
Zane Selvans wrote:
> Has anyone here ever used Basemap to display datasets/layers/features 
> created using the OGR/GDAL libraries (http://www.gdal.org/)? They're 
> SWIG wrappers, not pure Python, so I could see integration maybe being 
> a pain. Just curious if there was anything out there to build on 
> already...
>
> Thanks!
>
> --
> Zane Selvans
> Amateur Earthling
> http://zaneselvans.org
> za...@id...
> 303/815-6866
> PGP Key: 55E0815F
>
> 
Zane: You can use Basemap to plot GIS data you've read in with 
ogr/gdal. There's an example included with basemap (testgdal.py). I'm 
not a gdal user, so I may be missing something - what sort of 
integration do you have in mind?
-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-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Zane S. <za...@id...> - 2008年08月06日 21:09:59
Has anyone here ever used Basemap to display datasets/layers/features 
created using the OGR/GDAL libraries (http://www.gdal.org/)? They're 
SWIG wrappers, not pure Python, so I could see integration maybe being 
a pain. Just curious if there was anything out there to build on 
already...
Thanks!
--
Zane Selvans
Amateur Earthling
http://zaneselvans.org
za...@id...
303/815-6866
PGP Key: 55E0815F
From: Mark B. <ma...@gm...> - 2008年08月06日 20:57:59
I just played with putting contour labels on manually (and interactively).
It works fine by just left clicking on the spot where you want a label.
But how do you end this feature? The doc string says: right click, or
potentially click both mouse buttons together.
Neither works for me on win32, mpl 0.98.3, TkAgg backend, interactive mode.
Does this work for anybody?
Mark
Quick test:
cobj = contour(x,y,z) # x,y,z some arrays
cobj.clabel(manual=True)
From: Anthony F. <ant...@gm...> - 2008年08月06日 19:29:03
Oops, forgot to cc the list...
---------- Forwarded message ----------
From: Anthony Floyd <ant...@gm...>
Date: Wed, Aug 6, 2008 at 12:28 PM
Subject: Re: [Matplotlib-users] Moving legend with mouse?
To: Søren Nielsen <sor...@gm...>
On Fri, Aug 1, 2008 at 6:10 AM, Søren Nielsen
<sor...@gm...> wrote:
>
> I'm using matplotlib 0.98 together with wxpython 2.8.8.0. It would be nice
> to be able to click on the legend and move it with the mouse. Is that
> possible? Is there a simple way to do this? Has anyone tried this or can
> someone point in the direction?
>
> Thanks,
> Soren
Hi Soren,
Sorry for the delay. This is pretty easy to do if you're using the API.
Our code is pretty ... um, integrated, so I can't provide you with a
detailed step-by-step, but here's the general idea:
- On a FigureCanvas, use mpl_connect to hook into the
'motion_notify_event'. So, we have
"self.mpl_connect('motion_notify_event', self._onMouseMove)"
- onMouseMove checks to see if we've previously picked the legend and
adds mplEvent.x and mplEvent.y to the original pick location and calls
our self._moveLegend function
- The _moveLegend routine is:
 def _moveLegend(self, x, y, autoDraw=True):
 height = float(self.figure.bbox.height())
 width = float(self.figure.bbox.width())
 dx = x/width
 dy = y/height
 self._legendLocation = (dx, dy)
 self.plot.getLegend().setLocation(self._legendLocation)
 self._legend._loc=(dx,dy)
 if autoDraw:
 self.draw()
Now, you won't need most of this, but the important things here are
the dx,dy calculations and the _legend._loc=(dx,dy) assignment.
It's not a very complete set of instructions, but it might get you
pointed in the right direction. Legend dragging in this manner works
quite smoothly for us.
Regards,
Anthony.
From: John H. <jd...@gm...> - 2008年08月06日 19:02:04
On Wed, Aug 6, 2008 at 1:28 PM, peter websdell
<fly...@go...> wrote:
> No michael, that is what I was suggesting. Shame it doesn't work.
>
> I'm looking at using Enthoughts Chaco to do it. It's takes a bit more to get
> it doing what I want though, and I don't know if it does alpha transparency
> at all.
I believe chaco uses the same contouring routine as mpl does, though I
haven't verified this recently.
JDH
2 messages has been excluded from this view by a project administrator.

Showing results of 322

<< < 1 .. 7 8 9 10 11 .. 13 > >> (Page 9 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 によって変換されたページ (->オリジナル) /