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

Showing results of 383

<< < 1 2 3 4 .. 16 > >> (Page 2 of 16)
From: Zhuanshi H. <zhu...@gm...> - 2008年10月29日 18:44:07
Hi
I just installed matplotlib-0.98.3-py2.5-win32.egg using
"easy_inbstall -U matplotlib" on WinXP, and tried to test it under
ipython. It looks there is an ImportError exist.
Any patch is available?
see my screen outpus:
--------------------------------------------------------------------------------------------------------------------
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import matplotlib
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Python25\Scripts\<ipython console> in <module>()
c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\__ini
t__.py in <module>()
 126 import sys, os, tempfile
 127
--> 128 from rcsetup import defaultParams, validate_backend, validate_toolbar
 129 from rcsetup import validate_cairo_format
 130
c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\rcset
up.py in <module>()
 17 import warnings
 18 from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
---> 19 from matplotlib.colors import is_color_like
 20
 21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4
agg',
c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\color
s.py in <module>()
 37 import numpy as np
 38 from numpy import ma
---> 39 import matplotlib.cbook as cbook
 40
 41 cnames = {
c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\cbook
.py in <module>()
 7 import time, datetime
 8 import numpy as np
----> 9 import numpy.ma as ma
 10 from weakref import ref
 11
C:\Python25\Lib\site-packages\numpy\ma\__init__.py in <module>()
 15 from core import *
 16
---> 17 import extras
 18 from extras import *
 19
C:\Python25\Lib\site-packages\numpy\ma\extras.py in <module>()
 39 from numpy import ndarray, array as nxarray
 40 import numpy.core.umath as umath
---> 41 from numpy.lib.index_tricks import AxisConcatenator
 42 from numpy.lib.polynomial import _lstsq, _single_eps, _double_eps
 43
ImportError: cannot import name AxisConcatenator
In [2]:
-------------------------------------------------------------------------------------
-- 
Zhuanshi He / Z. He (PhD)
Waterloo Centre for Atmospheric Sciences (WCAS)
Department of Earth and Environmental Sciences
Phy Bldg, Rm 2022
University of Waterloo,
Waterloo, ON N2L 3G1
Canada
Tel: +1-519-888-4567 ext 38053 FAX: +1-519-746-0435
From: kaeguri <fay...@or...> - 2008年10月29日 12:59:07
Hi,
I am trying to get the fonts in the plots to be exactly like LaTeX would
give me in math mode using the \mathrm command.
So I set up the text to be in serif but still the font is too bold, I tried
to play with weight but I see no difference at all. In the following short
example http://www.nabble.com/file/p20226520/cdfii.py cdfii.py you will se
my probelm.
When running it in the legend I put in the second legend the word 'twist'
like I wish all my text would look like, I obtained it by cheating and using
within LaTeX math mode the \mathrm command, and after as you can see there
is the 'normal' word twist which appear too bold.
Where is the problem ?
Also I was thinking to use these kind of \mathrm cheats to fix it but when
using past functions I wrote for a previous matplotlib version it appear
that even the digits on the axis appear in a weird bold manner.
My question is the mthe following how can you force all text to look like
the font I want, is there a dedicated method or a brute force,... I would be
grateful to have anything !
Thanks
-- 
View this message in context: http://www.nabble.com/Cannot-get-non-bold-fonts-tp20226520p20226520.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Thomas P. <ya...@gm...> - 2008年10月28日 17:34:16
Hello,
I started off with the Polygon plotting example of the basemap toolkit as I
want to visualize Radar data with GoogleEarth.
I have a polygon shapefile and another data file in which I have one value
for each of the polygons.
I do the basemap.read_shapefile and the axes.add_patch stuff once in the
beginning, keeping a list of the polygon-instances.
Then, for each data file I set the face color of the polygons according to
their respective value and call pyplot.savefig() to save to a png file. This
way I have to do the time and memory consuming task of reading the shapefile
and producing the polygon patches (~40000) only once at the beginning.
That worked splendidly.
Now I wanted some data values to be transparent (so that only rainfall is
actually drawn). So I thought about using set_visible(None) on the
respective polygons.
That seems to work as well, but now I have the problem, that wherever a
polygon becomes invisible, the patch from the previous run remains visible.
So apparently, the figure's canvas (or whatever object is responsible for
the final image pixels) is not initialized between subsequent calls to
savefig.
I searched a bit through the code of figure.py, backend_bases.py,
backend_agg.py but didn't find any method that looked like it would erase
the canvas.
If I do clf() then savefig() always saves the same image over and over
again. I suppose it's because no new data is drawn to the canvas in this
case.
Any ideas, how to solve this?
Thank you for your help
Thomas
From: 302302 <30...@ce...> - 2008年10月28日 01:42:14
Hi,
I'm dealing with a problem how to redraw just label ticks in one certain subplot with in matplotlib. If I change description of axis in the subplot (by .set_yticks() and .set_yticklabels()) I have to redraw whole figure (figure.canvas.draw()) to see the changes.
But I need to redraw either just the one subplot with axis' description or just the descriptions. 
Is it possible to use there something like "blit" techniques? 
Thanks for any advice.
Czenek
From: John H. <jd...@gm...> - 2008年10月28日 00:23:07
On Mon, Oct 27, 2008 at 6:48 PM, Eric Firing <ef...@ha...> wrote:
>> It appears that the figure gets *bigger* as I make a and b *smaller* !??!
>>
>
> You will need to be more explicit about what you are doing to reach this
> conclusion.
What he is probably seeing comes from the fact that some of the figure
elements (line width, font size) are in physical dimensions. As you
make the figure size smaller with figsize, these dimensions are
unchanged, and so they look bigger in proportion to things that scale
proportionately with the figsize, eg the axes area. There is not
built-in scaling of these physical dimensions with figsize.
JDH
From: Eric F. <ef...@ha...> - 2008年10月27日 23:48:44
ch...@se... wrote:
> I'm confused about what
> 
> matplotlib.pyplot.figure(figsize = (a,b)) *means*
a and b are width and height in inches. For vector backends (svg, ps, 
pdf), that's all there is to it--unless there is a bug. For non-vector 
output (screen, *.png), the a, b get translated to pixels based on the 
figure.dpi (if to the screen) or the savefig.dpi (if to a file). If you 
display such a file on the screen, or print it, the size will depend on 
the software used for that display or printing, and this is completely 
out of mpl's control.
(Actually, even for vector output, what you see upon display will depend 
on the software used for display--acroread, evince, gs, ghostview, 
etc.--and on how it is configured. But at least the vector output 
formats specify physical sizes in real units, not arbitrary pixels.)
> 
> It appears that the figure gets *bigger* as I make a and b *smaller* !??!
> 
You will need to be more explicit about what you are doing to reach this 
conclusion.
Eric
> 
> Chris
> 
> -------------------------------------------------------------------------
> 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: <bre...@un...> - 2008年10月27日 23:21:02
You need to use the numpy 'where' functionality
import numpy as np
x, y, z = np.loadtxt("fileName.dat", unpack=True) # or similar
# x, y and z are now numpy arrays and have built in functionality as 
follows:
s = (z < 10.0) & (z**2 > 0.5) # or some other constraint. Produces an 
array 's' of boolean values
plot(x[s], y[s]) # will plot only those x,y pairs for which s is True
marcusantonius <mar...@st...> 
28/10/2008 09:40 AM
To
mat...@li...
cc
Subject
[Matplotlib-users] How to plot only points which lie in a certain range
I'm sorry for this newbie question. I have a data file consisting of 3
columns, and want to plot the first versus the second column, but only if
the parameter in the third column lies in a certain range. Does somebody
have an idea how to do that?
-- 
View this message in context: 
http://www.nabble.com/How-to-plot-only-points-which-lie-in-a-certain-range-tp20178863p20178863.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
______________________________________________________________________
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: <ch...@se...> - 2008年10月27日 23:17:08
I'm confused about what
matplotlib.pyplot.figure(figsize = (a,b)) *means*
It appears that the figure gets *bigger* as I make a and b *smaller* !??!
Chris
From: Pierre GM <bac...@gm...> - 2008年10月27日 22:59:43
On Monday 27 October 2008 18:40:07 marcusantonius wrote:
> I'm sorry for this newbie question. I have a data file consisting of 3
> columns, and want to plot the first versus the second column, but only if
> the parameter in the third column lies in a certain range. Does somebody
> have an idea how to do that?
Using masked arrays ?
import numpy as np
import numpy as ma
import matplotlib.pyplot as mpl
x = ma.arange(10)
y = ma.array(np.random.rand(10))
z = ma.array(np.random.rand(10))
(z_lo, z_up) = (0.1, 0.8)
x[ (z<z_lo) | (z>z_up) ] = ma.masked
mpl.plot(x,y, 'ok-')
Alternatively,
x = ma.masked_where((z<z_lo) | (z>z_up), x)
From: marcusantonius <mar...@st...> - 2008年10月27日 22:40:13
I'm sorry for this newbie question. I have a data file consisting of 3
columns, and want to plot the first versus the second column, but only if
the parameter in the third column lies in a certain range. Does somebody
have an idea how to do that?
-- 
View this message in context: http://www.nabble.com/How-to-plot-only-points-which-lie-in-a-certain-range-tp20178863p20178863.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Vincent Favre-N. <vi...@us...> - 2008年10月27日 22:29:16
On lundi 27 octobre 2008, Jeremy Conlin wrote:
> Thanks for introducing me to mlab. I had never heard of it before.
>
> I did:
>
> mlab.points3d(P[:,0],P[:,1],P[:,2],mode='point')
>
>
> where P is a (10000, 3) numpy array. mlab plotted the points, but the
> window became unresponsive. I can't imagine this is due to the number of
> points I'm drawing. Does anyone know what may cause this? (I'm on a mac
> running 10.5.5 with EPD.)
 I'm not sure, did you start using "ipython -wthread" ? The "-wthread" is 
required to handle the GUI - else you end up with a stuck GUI as you 
described.
 You can also try one of the test functions in mlab, e.g. 
mlab.test_points3d() - they should work if your installation is OK, again 
with the -wthread option.
 Now this may not be the best list to ask - I believe the enthought-dev list 
is where to get help for mayavi2:
https://mail.enthought.com/mailman/listinfo/enthought-dev
	Vincent
-- 
Vincent Favre-Nicolin
CEA Grenoble/INAC/SP2M			http://inac.cea.fr
Univ. Joseph Fourier (Grenoble) http://www.ujf-grenoble.fr
ObjCryst & Fox			http://objcryst.sf.net/Fox
From: Mathew Y. <mat...@gm...> - 2008年10月27日 21:20:39
Thank you!
On Mon, Oct 27, 2008 at 2:12 PM, Friedrich Hagedorn <fri...@gm...>wrote:
> On Mon, Oct 27, 2008 at 01:53:24PM -0700, Mathew Yeates wrote:
> > is there a way, when plotting many points, to decrease the size of the
> > point. With the default size I end up with overlapping points so some
> are
> > not displayed.
>
> Do you want to change (decrease) the following values?
>
> plot(range(10), '.-', linewidth=3, markersize=15) # big values for testing
>
> I hope that helps.
>
> By,
>
> Friedrich
>
From: Friedrich H. <fri...@gm...> - 2008年10月27日 21:13:04
On Mon, Oct 27, 2008 at 01:53:24PM -0700, Mathew Yeates wrote:
> is there a way, when plotting many points, to decrease the size of the
> point. With the default size I end up with overlapping points so some are
> not displayed.
Do you want to change (decrease) the following values?
 plot(range(10), '.-', linewidth=3, markersize=15) # big values for testing
I hope that helps.
By,
 Friedrich
From: Mathew Y. <mat...@gm...> - 2008年10月27日 20:53:35
is there a way, when plotting many points, to decrease the size of the
point. With the default size I end up with overlapping points so some are
not displayed.
Mathew
On Mon, Oct 27, 2008 at 10:59:40AM -0400, Michael Droettboom wrote:
> The size of the figure can be adjusted using
>
> figure(figsize=(width, height))
>
> subplots_adjust merely adjusts the margins between multiple subplots
> within the same figure.
Thanks. subplots_adjust(left=.., bottom=...) seems to have an effect on a
single plot too. It lets you add extra room for axis labels.
It *must* mess up the
aspect ratio of the plot since the axis labels are now "stealing" extra space
right?
Chris
From: John [H2O] <was...@gm...> - 2008年10月27日 16:53:03
Well, the image is being plotted using:
## create logorithmic scale
range_max = int(pl.ceil(dat_max))
step = int(pl.ceil(range_max/10)) 
logspace = 10.**np.linspace(-1, 4.0, 20) # 50 equally-spaced-in-log points
between 1.e-01 and 1.0e03
#plot#
im =
m.imshow(topodat,cmap=cm.s3pcpn,interpolation='nearest',vmin=dat_min,vmax=dat_max+(0.1*(dat_min-dat_max)))
The it is the 'Data Max' text that is of concern. Notice it does not equal
the max color according to the scale... the scatter point itself is not of
issue.
-john
Michael Droettboom-3 wrote:
> 
> The image is being plot in linear scale, while the scatter point is 
> being plotted with log scale...?
> 
> John [H2O] wrote:
>> I should add here also, this doesn't explain for me why the values are
>> different?? Thoughts on that mtter?
>>
>> Thanks!!
>>
>>
>> 
> 
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
> 
> 
> -------------------------------------------------------------------------
> 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
> 
> 
-- 
View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20191667.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Michael D. <md...@st...> - 2008年10月27日 16:19:36
The image is being plot in linear scale, while the scatter point is 
being plotted with log scale...?
John [H2O] wrote:
> I should add here also, this doesn't explain for me why the values are
> different?? Thoughts on that mtter?
>
> Thanks!!
>
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: John [H2O] <was...@gm...> - 2008年10月27日 16:03:20
I should add here also, this doesn't explain for me why the values are
different?? Thoughts on that mtter?
Thanks!!
-- 
View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20190717.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John [H2O] <was...@gm...> - 2008年10月27日 15:44:52
Okay,
I can't find where I came up with the original solution to use imshow with
custom clevs... I think it was a thread on this forum possibly, or in an
example. But the point is that I recall there was some development talk
about improving the handling of log data for this issue.... Does anyone have
some pointers on these changes? 
I guess what you would suggest is that I interpolate the data, then use
pcolor to plot it? Thanks.
Michael Droettboom-3 wrote:
> 
> imshow doesn't handle logarithmic data. You'll want to use pcolor or 
> pcolormesh instead.
> 
> As for the graininess, unfortunately, pcolor and pcolormesh don't 
> support any kind of interpolation. (imshow does, but it can only draw 
> uniform data).
> 
> Mike
> 
> John [H2O] wrote:
>> Hello,
>>
>> I'm trying to get imshow to plot logarithmic data. I'm having some
>> problems
>> with the colorbar or data??
>>
>> Note, I plot the max_dat value on the bottom of the figure, but it does
>> not
>> seem to correspond with the values in the plot??? Any ideas? Also, does
>> anyone have some recommendations on how to better smooth the values, i.e.
>> make the plume less 'grainy'? Thanks!
>>
>> My code is here:
>> http://numpy.pastebin.com/m4ae6331a
>>
>> Example output is here:
>> http://picasaweb.google.com/washakie/Temp#5260746894103850338
>>
>> 
> 
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
> 
> 
> -------------------------------------------------------------------------
> 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
> 
> 
-- 
View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20190337.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Michael D. <md...@st...> - 2008年10月27日 14:59:51
The size of the figure can be adjusted using
figure(figsize=(width, height))
subplots_adjust merely adjusts the margins between multiple subplots 
within the same figure.
Hope that helps.
Mike
ch...@se... wrote:
> I measured the displayed Matplotlib PDF on the screen and noticed it
> has a 4/3 (1.333...) aspect ratio by default.
>
> Is it EXACTLY 4/3? Even if I do:
>
> pylab.figure().subplots_adjust(left = EXTRA_ROOM,
> bottom = EXTRA_ROOM)
>
> ???
>
> (Why doesn't the subplots_adjust command seem to mess up the default aspect
> ratio?? )
>
> Chris
>
> -------------------------------------------------------------------------
> 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
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Vincent Favre-N. <vi...@us...> - 2008年10月27日 14:26:38
On lundi 27 octobre 2008, Jeremy Conlin wrote:
> I have a function (shown below) that would take a 3D numpy array and plot
> points in 3D. I recently updated my matplotlib with the latest Enthought
> Python Distribution and now it doesn't work; I guess matplotlib changed the
> api a little bit.
	Try the mlab interface to mayavi (which should be in your distribution) as a 
replacement:
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab.html
e.g. (starting with ipython -wthread):
	from enthought.mayavi import mlab
	mlab.test_points3d()
	
		Vincent
-- 
Vincent Favre-Nicolin
CEA Grenoble/INAC/SP2M			http://inac.cea.fr
Univ. Joseph Fourier (Grenoble) http://www.ujf-grenoble.fr
ObjCryst & Fox			http://objcryst.sf.net/Fox
From: Manuel M. <mm...@as...> - 2008年10月27日 14:16:33
Jeremy Conlin wrote:
> I have a function (shown below) that would take a 3D numpy array and plot
> points in 3D. I recently updated my matplotlib with the latest Enthought
> Python Distribution and now it doesn't work; I guess matplotlib changed the
> api a little bit.
> 
> The first problem arises because there is no matplotlib.axes3d anymore. I
> can't find the equivalent in the newest version. Can someone help me figure
> this out?
The axes3d support has been completely removed in matplotlib 0.98.x
> Thanks,
> Jeremy
> 
> #===================
> import matplotlib.pyplot as pyplot
> import matplotlib.axes3d as p3
> 
> def PlotPoints(P):
> """
> """
> fig = pyplot.figure()
> ax = p3.Axes3D(fig)
> ax.plot3D(P[:,0],P[:,1],P[:,2],'.')
> pyplot.show()
> return ax
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> 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: Jeremy C. <jer...@gm...> - 2008年10月27日 13:59:07
I have a function (shown below) that would take a 3D numpy array and plot
points in 3D. I recently updated my matplotlib with the latest Enthought
Python Distribution and now it doesn't work; I guess matplotlib changed the
api a little bit.
The first problem arises because there is no matplotlib.axes3d anymore. I
can't find the equivalent in the newest version. Can someone help me figure
this out?
Thanks,
Jeremy
#===================
import matplotlib.pyplot as pyplot
import matplotlib.axes3d as p3
def PlotPoints(P):
 """
 """
 fig = pyplot.figure()
 ax = p3.Axes3D(fig)
 ax.plot3D(P[:,0],P[:,1],P[:,2],'.')
 pyplot.show()
 return ax
From: Adam <kef...@gm...> - 2008年10月26日 23:35:04
Hi, I'm trying to make myself a set of widgets for the first time.
 I've gotten to the point that I can draw rectangles and lines and make
 them do the right things when re-drawing figures, zooming, etc., but
 I'm still a little lost on some points, and I haven't found any really
 good documentation.
So, first question: Where should I go for documentation first?
I've been using examples, e.g. widgets.py, and the pygtk event
 handling page, http://www.pygtk.org/pygtk2tutorial/sec-EventHandling.html.
 This page was a useful explanation of the stuff in widgets.py:
 http://www.nabble.com/some-API-documentation-td16204232.html.
Second question: I have two subplots of different data with the same
 dimensions. I'd like to zoom in to the same region on both figures
 when I use zoom-to-box on either one. How can I do this? (I'm using
 tkAgg)
 Thanks,
 Adam
From: Eric F. <ef...@ha...> - 2008年10月26日 22:44:21
Ryan May wrote:
> They're the same plotting interface, just different names. Pylab pulls 
> in a few extra functions that aren't specific to plotting, but aid in 
> providing matlab-alike functionality. To use matplotlib.pyplot instead 
> of pylab for any of the examples, just replace lines of:
> 
> import pylab
> 
> with:
> 
> import matplotlib.pyplot
Not quite--the above, taken literally, will not actually work.
To elaborate: pyplot provides a matlab-style state-machine interface to 
the underlying object-oriented interface in matplotlib. Pylab lumps 
pyplot together with numpy in a single namespace, making that namespace 
(or environment) even more matlab-like, particularly if one uses the 
ipython shell with the "-pylab" option, which imports everything from pylab.
Regarding matplotlib examples: we have been gradually converting them 
from pure matlab-style, using "from pylab import *", to a preferred 
style in which pyplot is used for some convenience functions, either 
pyplot or the object-oriented style is used for the remainder of the 
plotting code, and numpy is used explicitly for numeric array operations.
In this preferred style, the imports at the top are:
import matplotlib.pyplot as plt
import numpy as np
Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, 
plt.plot, plt.show, etc.
Example, pure matlab-style:
from pylab import *
x = arange(0, 10, 0.2)
y = sin(x)
plot(x, y)
show()
Now in preferred style, but still using pyplot interface:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.2)
y = np.sin(x)
plt.plot(x, y)
plt.show()
And using pyplot convenience functions, but object-orientation for the rest:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.2)
y = np.sin(x)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(x, y)
plt.show()
So, why do all the extra typing required as one moves away from the pure 
matlab-style? For very simple things like this example, the only 
advantage is educational: the wordier styles are more explicit, more 
clear as to where things come from and what is going on. For more 
complicated applications, the explicitness and clarity become 
increasingly valuable, and the richer and more complete object-oriented 
interface will likely make the program easier to write and maintain.
Eric
> 
> Ryan
> 
> On Sun, Oct 26, 2008 at 11:29 AM, <ch...@se... 
> <mailto:ch...@se...>> wrote:
> 
> On Sun, Oct 26, 2008 at 11:51:48AM -0400, Charlie Moad wrote:
> > The matplotlib.pyplot is favored over the pylab module now.
> 
> Thanks! I find your comment very interesting. As I have negligible
> experience
> with Matlab, I'd love to use matplotlib.pyplot.
> 
> The problem is all the docs use pylab right? Where find
> matplotlib.pyplot
> examples?
> 
> Chris
> 
> -------------------------------------------------------------------------
> 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=/
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> 
> 
> -- 
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> 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
2 messages has been excluded from this view by a project administrator.

Showing results of 383

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