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 results of 226

<< < 1 2 3 4 .. 10 > >> (Page 2 of 10)
From: Eric F. <ef...@ha...> - 2006年08月29日 19:33:19
Benjamin THYREAU wrote:
> Hi,
> Does someone know of a convenient way to save a plotted figure in order to 
> reloading it later, possible adding new stuffs to it ? Presently, i keep 
> pickling my data and cut&pasting my drawing code, by hand. I'm interested if 
> some of you would have better solutions.
There has been some discussion of making such a mechanism, but it does 
not exist. I think a better strategy is to encapsulate your code in 
files as functions and/or scripts so as to avoid the cutting and 
pasting. If initially you are plotting interactively, ipython can make 
it easier for you to do this encapsulation: 
http://ipython.scipy.org/doc/manual/node6.html#SECTION00066000000000000000
Eric
From: Benjamin T. <th...@sh...> - 2006年08月29日 16:28:31
Hi,
Does someone know of a convenient way to save a plotted figure in order to 
reloading it later, possible adding new stuffs to it ? Presently, i keep 
pickling my data and cut&pasting my drawing code, by hand. I'm interested if 
some of you would have better solutions.
Thanks
--
Benjamin Thyreau
CEA Orsay
From: John H. <jdh...@ac...> - 2006年08月29日 16:17:20
>>>>> "Samuel" == Samuel GARCIA <sg...@ol...> writes:
 Samuel> Hi all, there is a image.set_clim() but I can't find the
 Samuel> image.get_clim()
 Samuel> Any solution ?
I just committed get_clim to SVN, but in the meantime, you can access
with the image normalization instance, which is what clim is an
interface to anyhow:
In [5]: im = imshow(rand(10,10))
In [6]: im.norm.vmin, im.norm.vmax
Out[6]: (0.011246857233345509, 0.99705302715301514)
From: Samuel G. <sg...@ol...> - 2006年08月29日 09:16:33
Hi all,
there is a image.set_clim()
but I can't find the image.get_clim()
Any solution ?
thank you
Samuel
From: John H. <jdh...@ac...> - 2006年08月29日 04:41:14
>>>>> "Tommy" == Tommy Grav <tg...@ma...> writes:
 Tommy> In a plot window (using Tkagg). just right of the menu the
 Tommy> x and y positions of the pointer is shown when the mouse is
 Tommy> in the window. Since I am using small windows this will
 Tommy> change the size of the window. Is there a way to set the
 Tommy> format or remove this text?
This is fixed in mpl svn -- give it a test drive if you can...
JDH
From: John H. <jdh...@ac...> - 2006年08月29日 04:38:43
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
 Eric> I don't think so; and although I have not thought hard about
 Eric> it, my impression is that adding this capability would take
 Eric> a lot of work and redesign. I expect that in most cases
 Eric> what you describe would not be the desired behavior, so it
 Eric> would have to be a non-default option.
One should be able to write a specific example that exposes this
functionality fairly easily using callback event handling. I'll
provide a simple example using a line plot to get the approximate
ylimits of the data based on the xaxis zoom limits, and maybe some
enterprising developer can extend this example to an image which sets
the clim based on the xlim and ylim
from pylab import nx, figure, show
t = nx.arange(0.0, 2.0, 0.1)
s = nx.sin(2*nx.pi*t)
fig = figure()
ax = fig.add_subplot(111)
ax.plot(t, s)
def on_xlim(ax):
 xmin, xmax = ax.get_xlim()
 imin, imax = nx.searchsorted(t, (xmin, xmax))
 thiss = s[imin:imax]
 ax.set_ylim(min(thiss), max(thiss))
 ax.figure.canvas.draw()
ax.connect('xlim_changed', on_xlim)
show()
From: John H. <jdh...@ac...> - 2006年08月29日 04:21:20
>>>>> "Richard" == Richard Harvey Chapman <hch...@3g...> writes:
 Richard> Briefly, is there a way to get a callback in the event
 Richard> that the canvas has been redrawn (e.g. from a zoom or
 Richard> pan)?
 Richard> matplotlib 0.86.2 python 2.4.1 wxPython 2.6.2.1 Mac OS
 Richard> X.4.7
 Richard> I draw a circle at a certain point. I let the user drag
 Richard> that point to a new location. However, if the plot is
 Richard> redrawn for any reason, I have to redraw my circle in a
 Richard> new position. I can't seem to find any way to get
 Richard> notified of a redraw.
Have you dried connecting to a draw_event?
 def ondraw(event):
 # do something
 pass
 fig.canvas.mpl_connect('draw_event', ondraw)
FYI, the widgets module matplotlib.widgets is a good place to look for
examples of mpl event handling, in addition to the class documentation
in the Event hierarchy in
http://matplotlib.sourceforge.net/matplotlib.backend_bases.html
JDH
From: John H. <jdh...@ac...> - 2006年08月29日 04:13:33
>>>>> "Jouni" =3D=3D Jouni K Sepp=E4nen <jk...@ik...> writes:
 Jouni> How I came up with this: I knew that I wanted to make some
 Jouni> of the xticklines invisible, so I looked at the list of
 Jouni> line objects for clues as to what differs between
 Jouni> them. They seem to have xdata and ydata properties, and
 Jouni> ydata is (0,) for half of the lines and (1,) for the other
 Jouni> half, so it looks like it is the vertical position in axis
 Jouni> coordinates. (xdata seems to be in data coordinates.)
Off the top of my head, I didn't remember the answer either. Here's
how I answered it: I opened up lib/matplotlib/axis.py in my local copy
of the mpl src distro and searched for Tick (you could have done the
same by pointing your browser to
http://matplotlib.sourceforge.net/matplotlib.axis.html#Tick) and saw
the following attributes in the docstring
 Publicly accessible attributes
 tick1line : a Line2D instance
 tick2line : a Line2D instance
 gridline : a Line2D instance
 label1 : a Text instance
 label2 : a Text instance
 gridOn : a boolean which determines whether to draw the ticklin=
e
 tick1On : a boolean which determines whether to draw the 1st tic=
kline
 tick2On : a boolean which determines whether to draw the 2nd tic=
kline
 label1On : a boolean which determines whether to draw tick label
 label2On : a boolean which determines whether to draw tick label
I know, and it should be better documented, that for the x-axis, the
tick1 and label1 designations are for the lower axis, and the tick2
and label2 are for the upper (ditto for left/right for the y-axis).
So tick.tick1line controls the properties for the lower tick, etc.
Thus one can do
for tick in ax.xaxis.get_major_ticks():
 tick.tick1line.set_visible(False)
 tick.label2.set_color('darkslategray')
As Jouni notes, the documentation could and should be better, but the
underlying concepts are pretty simple. A Figure contains multiple
Axes, each of which contains an XAxis and YAxis. The XAxis and Yaxis
contains XTicks and YTicks, and these contains tick lines (Line2D
instances) and tick labels (Text instances). Each of these upper-case
thingies is a well-documented matplotlib class (this class containment
hierarchy is also documented in the user's guide). For future
reference, the links to the class documentation for each of these is
Figure : http://matplotlib.sourceforge.net/matplotlib.figure.html
Axes/Subplot : http://matplotlib.sourceforge.net/matplotlib.axes.html
XAxis/YAxis : http://matplotlib.sourceforge.net/matplotlib.axis.html
XTick/YTick : http://matplotlib.sourceforge.net/matplotlib.axis.html
Line2D : http://matplotlib.sourceforge.net/matplotlib.lines.html
Text : http://matplotlib.sourceforge.net/matplotlib.text.html
As Jouni notes, setp and getp are a nice way to get quick interactive
access to the configurable properties, but they are also documented in
the class documentation in the links above.
JDH
From: Samuel G. <sg...@ol...> - 2006年08月28日 07:21:42
Darren Dale wrote:
> On Saturday 19 August 2006 12:47, Charlie Moad wrote:
> 
>> On 8/19/06, Darren Dale <dd...@co...> wrote:
>> 
>>> On Friday 18 August 2006 08:27, Darren Dale wrote:
>>> 
>>>> On Wednesday 16 August 2006 04:54, Samuel GARCIA wrote:
>>>> 
>>>>> Thank you,
>>>>> Sorry I did known the existence of
>>>>> matplotlib.backends.backend_qt4agg. It is more easy than I thought.
>>>>>
>>>>> but I still have a problem. This is my code :
>>>>>
>>>>> import sys
>>>>>
>>>>> from PyQt4.QtCore import *
>>>>> from PyQt4.QtGui import *
>>>>>
>>>>> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
>>>>> FigureCanvas
>>>>> from matplotlib.figure import Figure
>>>>>
>>>>> #--------------------------------------------------------------------
>>>>> ---- -- ---- class MyWidget(QWidget):
>>>>> def __init__(self, parent=None):
>>>>> QWidget.__init__(self, parent)
>>>>> self.menuBar = QMenuBar()
>>>>> self.fileMenu = QMenu(self.tr("&File"), self)
>>>>> self.menuBar.addMenu(self.fileMenu)
>>>>>
>>>>> mainLayout = QVBoxLayout()
>>>>> mainLayout.setMenuBar(self.menuBar)
>>>>>
>>>>> self.setLayout(mainLayout)
>>>>>
>>>>> #--------------------------------------------------------------------
>>>>> ---- -- ---- if __name__ == "__main__":
>>>>> app = QApplication(sys.argv)
>>>>> dialog = MyWidget()
>>>>> dialog.show()
>>>>> sys.exit(app.exec_())
>>>>>
>>>>> and it does not works because the main window is blocking.
>>>>> 
>>> There is a comment in the embedding_in_qt.py example:
>>>
>>> # The QApplication has to be created before backend_qt is imported,
>>> otherwise # it will create one itself.
>>>
>>> This goes for qt4 as well, and is the source of the problem. You can have
>>> only one QApplication at a time. (Ted, John, do you think the
>>> QApplication really needs to be created during the module import? show()
>>> is the only function that looks for the QApplication, maybe the qApp
>>> should be created there instead. Any reason against?)
>>>
>>> I added an example, embedding_in_qt4.py, to the svn repository. It is
>>> closely based on embedding_in_qt.py.
>>> 
>> From what I saw, creating QApp in show makes more sense.
>> 
>
> I changed the qt backends to create a QApplication in show() rather than at 
> the time of module import. I also updated the embedding_in_qt* examples. 
> Samuel, as of svn 2711, you are free to create your QApplication *after* you 
> import backend_qt(4).
>
> Darren
>
> P.S.- For anyone who is interested, I'd recommend "C++ GUI Programming with Qt 
> 4" (available at Amazon). I'm not an experienced C++ programmer, but the book 
> has an excellent (and brief) introduction to C++ in the appendix, and is easy 
> enough to understand for anyone who wants to work with PyQt4.than you
Thank you,
for the moment It is not a problem for me te create the QApplication 
before.
I have just 1 week to finish my project. And I use the debian package.
So I don't have time to install svn version for the moment.
I will try it in 2 or 3 weeks.
Programming wyth PyQt4 and matplotlib is really great. You can create
little but good loocking application in a very short time.
Thany you for every people involved in these projects.
Samuel
From: Tommy G. <tg...@ma...> - 2006年08月27日 17:59:20
In a plot window (using Tkagg). just right of the menu the x and y 
positions
of the pointer is shown when the mouse is in the window. Since I am 
using
small windows this will change the size of the window. Is there a way 
to set
the format or remove this text?
Cheers
Tommy
tg...@ma...
http://homepage.mac.com/tgrav/
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genious -- and a lot of courage --
to move in the opposite direction"
 -- Albert Einstein
From: Darren D. <dd...@co...> - 2006年08月27日 17:44:09
On Saturday 19 August 2006 12:47, Charlie Moad wrote:
> On 8/19/06, Darren Dale <dd...@co...> wrote:
> > On Friday 18 August 2006 08:27, Darren Dale wrote:
> > > On Wednesday 16 August 2006 04:54, Samuel GARCIA wrote:
> > > > Thank you,
> > > > Sorry I did known the existence of
> > > > matplotlib.backends.backend_qt4agg. It is more easy than I thought.
> > > >
> > > > but I still have a problem. This is my code :
> > > >
> > > > import sys
> > > >
> > > > from PyQt4.QtCore import *
> > > > from PyQt4.QtGui import *
> > > >
> > > > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
> > > > FigureCanvas
> > > > from matplotlib.figure import Figure
> > > >
> > > > #--------------------------------------------------------------------
> > > >---- -- ---- class MyWidget(QWidget):
> > > > def __init__(self, parent=None):
> > > > QWidget.__init__(self, parent)
> > > > self.menuBar = QMenuBar()
> > > > self.fileMenu = QMenu(self.tr("&File"), self)
> > > > self.menuBar.addMenu(self.fileMenu)
> > > >
> > > > mainLayout = QVBoxLayout()
> > > > mainLayout.setMenuBar(self.menuBar)
> > > >
> > > > self.setLayout(mainLayout)
> > > >
> > > > #--------------------------------------------------------------------
> > > >---- -- ---- if __name__ == "__main__":
> > > > app = QApplication(sys.argv)
> > > > dialog = MyWidget()
> > > > dialog.show()
> > > > sys.exit(app.exec_())
> > > >
> > > > and it does not works because the main window is blocking.
> >
> > There is a comment in the embedding_in_qt.py example:
> >
> > # The QApplication has to be created before backend_qt is imported,
> > otherwise # it will create one itself.
> >
> > This goes for qt4 as well, and is the source of the problem. You can have
> > only one QApplication at a time. (Ted, John, do you think the
> > QApplication really needs to be created during the module import? show()
> > is the only function that looks for the QApplication, maybe the qApp
> > should be created there instead. Any reason against?)
> >
> > I added an example, embedding_in_qt4.py, to the svn repository. It is
> > closely based on embedding_in_qt.py.
>
> From what I saw, creating QApp in show makes more sense.
I changed the qt backends to create a QApplication in show() rather than at 
the time of module import. I also updated the embedding_in_qt* examples. 
Samuel, as of svn 2711, you are free to create your QApplication *after* you 
import backend_qt(4).
Darren
P.S.- For anyone who is interested, I'd recommend "C++ GUI Programming with Qt 
4" (available at Amazon). I'm not an experienced C++ programmer, but the book 
has an excellent (and brief) introduction to C++ in the appendix, and is easy 
enough to understand for anyone who wants to work with PyQt4.
From: Scott R. <sr...@nr...> - 2006年08月27日 15:27:25
Hi All,
I'm using matplotlib (with agg backends) from recent svn:
In [63]: matplotlib.__version__
Out[63]: '0.87.4'
and I can't seem to get contour() or contourf() to utilize the
alpha keyword. No matter what value I set, alpha=1.0 on the
output. Alpha in general works fine, as the scatter_demo2.py
example gives very nicely alpha-channeled output.
Any ideas? Thanks a bunch,
Scott
-- 
-- 
Scott M. Ransom Address: NRAO
Phone: (434) 296-0320 520 Edgemont Rd.
email: sr...@nr... Charlottesville, VA 22903 USA
GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989
From: Ken M. <mc...@ii...> - 2006年08月27日 02:19:14
David,
This are not any WxMpl mailing lists at this time. If you have a 
problem or need to ask some questions, please send me an email.
Ken
From: Ken M. <mc...@ii...> - 2006年08月27日 02:18:21
On Aug 14, 2006, at 3:30 PM, Kenny Ortmann wrote:
>
> 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.
For WxMpl questions, this list is currently the closest thing to a 
right place. I can also be contacted directly via email.
> 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.
This is a bug that has been fixed in the wxmpl subversion 
repository. I should probably make another release so no one else 
has the same problem.
You can grab the latest wxmpl.py from
	http://svn.csrri.iit.edu/mr-software/wxmpl/trunk/lib/wxmpl.py
Ken
From: Andrew S. <str...@as...> - 2006年08月26日 22:35:46
Jeff Whitaker wrote:
> You should be able to make all those plots without too much difficulty - 
> just some trial and error in choosing the corners of the plot region. 
> If you are making a polar stereographic projection, you can use 
> projection='npstere' or 'spstere' and set the bounding latitude (the 
> latitude that is tangent to the plot boundary - see the polarmaps.py 
> example) and Basemap will determine the corners for you automatically. 
> I don't know of any obvious way to do this for the equatorial case - 
> it's pretty hard to guess what the user might want. I welcome any 
> suggestions though.
>
> -Jeff
>
> 
Dear Jeff,
Thanks for your quick reply.
I ended up setting my boundaries by simply using the projection to plot my points, letting matplotlib plot the x,y points (without basemap to set the axes limits), and then taking the limits automatically computed by matplotlib and passing them through the inverse projection to get the lon,lat coordinates of the box. Now, on my next pass through, I'm using these as the bounding box information.
As always, basemap is working very well.
Cheers!
Andrew
From: Jeff W. <js...@fa...> - 2006年08月26日 19:52:47
Andrew Straw wrote:
> I've been playing around with stereographic projections, and it appears
> that the bounding-box for the 'stere' projection isn't computed. Being
> blissfully unaware of all the complexities involved, I thought I'd send
> this email to see if there's an easy way to deal with the situation.
>
> Basically, I'm trying to plot on an equatorial stereographic projection
> created like so:
>
> m=Basemap(projection='stere', lat_ts = 0.0, lat_0 = 0, lon_0 = 90.0)
>
> This creates a projection that seems to work well, but the problem is
> that the [ll|ur]crn* attributes aren't set to anything useful, meaning
> that lots of the nice basemap goodies aren't working (drawmeridians, etc.)
> 
Andrew: The [ll|ur]crn* have default values which don't work very well 
for the stereographic projection (-90,+90,-180,+180). You'll have to 
set them yourself when you create the Basemap instance.
> (Note: I don't really understand what the lat_ts is doing -- the
> docstring says it is the "natural origin". I can't find reference to
> this at http://en.wikipedia.org/wiki/Stereographic_projection . I guess
> this is related to the discussion of "scale error at the extremities"
> at 
> http://www.remotesensing.org/geotiff/proj_list/oblique_stereographic.html
> , and thus I assume that if lat_ts is set to lat_0, the scale factor
> will be 1 at the point of tangency. )
> 
AFAICT, lat_ts is the latitude of 'true scale', whatever that means. I 
set the docstring based upon the info at 
http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html. 
> So, the question is, can some default bounding box be computed for
> equatorial (and possibly oblique) stereographic projections in any
> reasonable way? It would be nice to make plots like those found on the
> wikipedia page.
> 
You should be able to make all those plots without too much difficulty - 
just some trial and error in choosing the corners of the plot region. 
If you are making a polar stereographic projection, you can use 
projection='npstere' or 'spstere' and set the bounding latitude (the 
latitude that is tangent to the plot boundary - see the polarmaps.py 
example) and Basemap will determine the corners for you automatically. 
I don't know of any obvious way to do this for the equatorial case - 
it's pretty hard to guess what the user might want. I welcome any 
suggestions though.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Andrew S. <str...@as...> - 2006年08月26日 18:49:37
I've been playing around with stereographic projections, and it appears
that the bounding-box for the 'stere' projection isn't computed. Being
blissfully unaware of all the complexities involved, I thought I'd send
this email to see if there's an easy way to deal with the situation.
Basically, I'm trying to plot on an equatorial stereographic projection
created like so:
m=Basemap(projection='stere', lat_ts = 0.0, lat_0 = 0, lon_0 = 90.0)
This creates a projection that seems to work well, but the problem is
that the [ll|ur]crn* attributes aren't set to anything useful, meaning
that lots of the nice basemap goodies aren't working (drawmeridians, etc.)
(Note: I don't really understand what the lat_ts is doing -- the
docstring says it is the "natural origin". I can't find reference to
this at http://en.wikipedia.org/wiki/Stereographic_projection . I guess
this is related to the discussion of "scale error at the extremities"
at 
http://www.remotesensing.org/geotiff/proj_list/oblique_stereographic.html
, and thus I assume that if lat_ts is set to lat_0, the scale factor
will be 1 at the point of tangency. )
So, the question is, can some default bounding box be computed for
equatorial (and possibly oblique) stereographic projections in any
reasonable way? It would be nice to make plots like those found on the
wikipedia page.
Cheers!
Andrew
From: PGM <pgm...@gm...> - 2006年08月25日 21:00:29
Hola,
Use the SVN version, it works pretty OK with 1.0b2
From: Flavio C. <fcc...@gm...> - 2006年08月25日 20:52:28
hi
which is the latest version of numpy supported by matplotlib?
I recently updated to numpy 1.0b2 and I cant import pylab anymore.
part of the problem is this code of numerix.__init__.py:
elif which[0] =3D=3D "numpy":
 try:
 import numpy.oldnumeric as numpy
 from numpy.oldnumeric import *
 except ImportError:
 import numpy
 from numpy import *
 from _sp_imports import nx, infinity
 from _sp_imports import UInt8, UInt16, UInt32
 Matrix =3D matrix
matrix is no longer present on numpy.oldnumeric, so... it breaks....
any hints?
--=20
Fl=E1vio Code=E7o Coelho
registered Linux user # 386432
---------------------------
"Laws are like sausages. It's better not to see them being made."
Otto von Bismark
From: Derek H. <dh...@cs...> - 2006年08月25日 09:14:23
 Jouni=20
Wow! A guru at work... this solves all my current problems;
your insights and comments are most appreciated!
To return to my first post - matplotlib aims to make simple things
simple - I would argue that the way tickmarks are currently dealt
with is NOT simple & it would be great to see some simplifications
or additions to the interface to deal with the issues raised in this
thread (for example, by aligning their behaviour and properties to=20
other, similar, chart properties).
Thanks again,
Derek
>>> Jouni K Sepp=E4nen <jk...@ik...> 2006年08月23日 08:52 AM >>>
[Again copying to matplotlib-users; maybe the main developers can=20=20
comment on whether these shortcomings in the getp/setp interface=20=20
should be fixed.]
Hi Derek,
> It does seem as those these settings affect the top and bottom of=20=20
> the graph - I was wondering if it was possible to show tickmarks=20=20
> along the bottom edge but not the top edge?
I don't think that's directly supported. Here's a hacky way to do it:
 lines =3D getp(gca(), 'xticklines')
 toplines =3D [ l for l in lines if getp(l, 'ydata') =3D=3D (1,) ]
 setp(toplines, visible=3DFalse)
How I came up with this: I knew that I wanted to make some of the=20=20
xticklines invisible, so I looked at the list of line objects for=20=20
clues as to what differs between them. They seem to have xdata and=20=20
ydata properties, and ydata is (0,) for half of the lines and (1,)=20=20
for the other half, so it looks like it is the vertical position in=20=20
axis coordinates. (xdata seems to be in data coordinates.)
> And the other property I do not see on the list is the one that=20=20
> shows whether a tick goes "into" the graph or just "out" - in the=20=20
> prc file, there is a line:
> xtick.direction : in # direction: in or out
> but there is no "direction' property?
You're right, there is no obvious property to control this. Here's an=20=20
even hackier way to do this (and one that doesn't look very future-=20
proof):
 for l in getp(gca(), 'xticklines'):
 setp(l, 'marker', 5-getp(l, 'marker'))
The line objects have a marker property, which is 2 for some markers=20=20
and 3 for the others... so I guessed that one of them means upwards=20=20
and the other downwards, and checked this guess by flipping the=20=20
xtick.direction parameter and looking again. So subtracting the=20=20
marker from 5 flips the direction.
I wonder how this is done in Matlab?
> label: any string
>
> which shows me that the Yaxis has a label - in this case a
> string - but I do not see how one can set the font properties
> for the Yaxis label as it is not Text object??
I think you cannot do this with setp alone. Use the ylabel command:
 ylabel('foo bar', fontsize=3D18)
--=20
Jouni
-------------------------------------------------------------------------
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 easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642=20
_______________________________________________
Matplotlib-users mailing list
Mat...@li...=20
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--=20
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
=20
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html=20
=20
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html=20
=20
For electronic copies of the CSIR Copyright, Terms and Conditions and the C=
SIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
Cal...@cs....
This message has been scanned for viruses and dangerous content by MailScan=
ner,=20
and is believed to be clean.
From: Eric F. <ef...@ha...> - 2006年08月25日 07:55:42
Jordan Dawe wrote:
> So I have a contourf plot and I am resetting the ylims so as to only 
> display a subset of the full contourf plot. Is there anyway to set norm 
> and the colorbar so they take their colormapping settings using the data 
> currently on display? By which I mean: the full dataset has a range of 
> 260-320. The reset axes limits display a region that only has values 
> between 280-310. I'd like the colormap to extend over this range of 
> values automatically, without having to set vmin=280, vmax=310. Any way 
> to do that?
Jordan,
I don't think so; and although I have not thought hard about it, my 
impression is that adding this capability would take a lot of work and 
redesign. I expect that in most cases what you describe would not be 
the desired behavior, so it would have to be a non-default option.
Eric
From: Michael F. <mp...@be...> - 2006年08月25日 02:16:37
Hi all,
Sometime in the past couple months, there's been a change in SVN that's 
causing me problems when trying to hide tick labels. I think the problem is 
related to the get_xticklabels()/get_yticklabels() methods of the Axes class, 
in that they only return a list consisting of a single tick label no matter 
how many there should be. I'm encountering this problem in SVN rev. 2706.
Here is some example code:
from pylab import *
# set up a plot
x = arange(5)
ax = subplot(111)
ax.plot(x, x)
# hide the first tick label on the x axis
xtl = ax.get_xticklabels()
xtl[0].set_visible(False)
print len(xtl)
ax.set_xlabel('foo')
show()
For me, no x tick labels are drawn, and the length of xtl is one instead of 
the expected 9. 
Can anyone reproduce this?
Mike
From: Jordan D. <jd...@eo...> - 2006年08月25日 00:13:15
So I have a contourf plot and I am resetting the ylims so as to only 
display a subset of the full contourf plot. Is there anyway to set norm 
and the colorbar so they take their colormapping settings using the data 
currently on display? By which I mean: the full dataset has a range of 
260-320. The reset axes limits display a region that only has values 
between 280-310. I'd like the colormap to extend over this range of 
values automatically, without having to set vmin=280, vmax=310. Any way 
to do that?
Jordan
From: jenny <je...@gm...> - 2006年08月24日 20:11:41
Hi Charlie,
Jenny here. I'm trying to make an executable of my python program that uses
MatPlotLib. I tried your example below and I got this kind of error when I
ran the exe. I'm using python 2.3.3, MatPlotLib 0.87.3 and py2exe 0.6.5. I
really need to use the MatPlotLib don't know what to do.
Thanks,
Jenny
----Error------------------------------------------------------------------=
--------------------------------------------------------------
Traceback (most recent call last):
 File "simple_plot.py", line 1, in ?
 File "pylab.pyo", line 1, in ?
 File "matplotlib\pylab.pyo", line 219, in ?
 File "matplotlib\backends\__init__.pyo", line 23, in pylab_setup
ImportError: No module named backend_tkagg
Charlie Moad wrote:
>=20
> A feature I mentioned on the list a few weeks ago is in the 0.87
> release that was pushed today. It is
> "matplotlib.get_py2exe_datafiles()". You can see it used in the
> sample setup.py script below.
>=20
> Begin setup.py script
> -------------------------------------------------------------------------=
-------------
> # For py2exe only
> """
> Run with the following command (use py2exe 0.6.2 or higher)
>=20
> python.exe -OO setup.py py2exe -b 3 -c -p numarray,pytz -e numpy
> """
>=20
> import os
> from distutils.core import setup
> import py2exe
> import glob
>=20
> import matplotlib
>=20
> setup( version =3D '0.9.1',
> windows =3D ['nlogui.py'],
> data_files =3D [('', ['nlo.gif', '../vtkrotate/NMA.pdb']),
> matplotlib.get_py2exe_datafiles()],
> options=3D{"py2exe":{"optimize":2}},
> )
>=20
>=20
> On 2/22/06, Jeff Peery <jef...@ya...> wrote:
>> Hi, I'm pretty unfamiliar with py2exe and I had been using it with
>> matplotlib and it was working well. I upgraded to 0.86 and now it doesn'=
t
>> work. I know this is because the installation directory is different (no
>> longer the share folder). I thought I fixed it correctly but I get an
>> error
>> that indicates py2exe "can't find
>> lib/site-packages/matplotlib/backends or it is not a
>> regular file". I am assuming that it doesn't like 'backends' because it
>> is
>> a folder and not a file. I changed my setup code to this:
>>
>> data_files=3D[
>> ("matplotlibdata",
>> glob.glob(os.path.join(distutils.sysconfig.PREFIX,
>> 'lib', 'site-packages','matplotlib', "*")))]
>>
>> setup(
>> options =3D options,
>> # The lib directory contains everything except the executab les and
>> the
>> python dll.
>> windows =3D [app],
>> data_files =3D data_files,
>> # use out build_installer class as extended py2exe build command
>> cmdclass =3D {"py2exe": build_installer},
>> )
>>
>> how might I change this to get it working properly? thanks!!
>>
>> Jeff
>>
>>
>> ________________________________
>> Brings words and photos together (easily) with
>> PhotoMail - it's free and works with Yahoo! Mail.
>>
>>
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid1720ドル&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>=20
>=20
--=20
View this message in context: http://www.nabble.com/py2exe-setup-script-tf1=
172593.html#a5935932
Sent from the matplotlib - users forum at Nabble.com.
From: Darren D. <dd...@co...> - 2006年08月24日 19:24:24
On Thursday 24 August 2006 15:03, hu...@ya... wrote:
> It=C5=9B working now, thanks. Just a remark why the fonts must be in mpl-=
data
> and why matplotlib is not using the fonts who are in the system?
It's a bug. Edin said he would work on it.
> Le jeudi 24 ao=C3=BBt 2006 13:56, vous avez =C3=A9crit=C2=A0:
> > On Thursday 24 August 2006 13:42, hu...@ya... wrote:
> > > 	Hello,
> > >
> > > I saw that mathtext2 was include in the svn, I try to test it but even
> > > the demo is not working with the error message:
> > >
> > >
> > >
> > > ValueError: unrecognized symbol "\frac3"
> > > WARNING: Failure executing file: <mathtext2_demo.py>
> >
> > The demo doesn't work out of the box. You need to install download the
> > freefont fonts into your mpl-data directory, and then add the following
> > before the pylab import in mathtext2_demo.py:
> >
> > from matplotlib import rcParams
> > rcParams['mathtext2'] =3D True
> > rcParams['mathtext.rm'] =3D 'FreeSerif.ttf'
> > rcParams['mathtext.it'] =3D 'FreeSerifItalic.ttf'
> > rcParams['mathtext.tt'] =3D 'FreeMono.ttf'
> > rcParams['mathtext.mit'] =3D 'FreeSerifItalic.ttf'
> > rcParams['mathtext.cal'] =3D 'FreeSansOblique.ttf'
> > rcParams['mathtext.nonascii'] =3D 'FreeSerif.ttf'
>
> -------------------------------------------------------------------------
> 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=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-3819
fax: (607) 255-9001
2 messages has been excluded from this view by a project administrator.

Showing results of 226

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