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
(14) |
2
(22) |
3
(8) |
4
(10) |
5
(1) |
|
6
|
7
(11) |
8
(4) |
9
(14) |
10
(18) |
11
(18) |
12
(2) |
|
13
(8) |
14
(14) |
15
(6) |
16
(8) |
17
(9) |
18
(9) |
19
(7) |
|
20
(8) |
21
(8) |
22
(14) |
23
(10) |
24
(11) |
25
(17) |
26
(1) |
|
27
(3) |
28
(12) |
|
|
|
|
|
|
From: Dominique O. <Dom...@po...> - 2005-02-02 23:33:51
|
Hello,
How complicated would it be to obtain the add_patch() capability in
polar axes? Right now, the script
--------------------
from pylab import *
import matplotlib.patches as patches
ax = axes( [0.1, 0.1, 0.8, 0.8], polar = True )
ptch = patches.RegularPolygon( (pi/2,.5), 5, orientation = 20 )
ax.add_patch()
show()
--------------------
fails, Python complaining that polar axes don't have an add_patch() method.
Now, I believe if we simply mimic what's in the Axes class and try to use
artists.extend(patches)
in PolarAxes, the coordinates are going to be all wacko.
The following works for me, and I wonder whether it is a useful addition
to PolarAxes (sorry for the wrapped lines):
--------------------
from matplotlib.pylab import *
def RegularPolygon_polar( ax, xy, numVertices, radius = 5, orientation =
0, **kwargs ):
import matplotlib.patches as patches
import matplotlib.transforms as transforms
ptch = patches.RegularPolygon( (0,0),
numVertices,
radius = radius,
orientation = orientation,
**kwargs )
trans = transforms.identity_affine()
trans.set_offset( xy, ax.transData )
ptch.set_transform( trans )
return ptch
ax = axes( [0.1, 0.1, 0.8, 0.8], polar = True )
ptch = RegularPolygon_polar( ax, (150*pi/180,.5), 5, radius = 10,
orientation = 80 )
ax.add_patch( ptch )
show()
--------------------
If this sounds like the way to go, let me know. I'm willing to write the
few methods similar to the above and add them to PolarAxes.
On the other hand, it might be easier to simply modify the classes in
patches.py, but I am not sure how they would access the Axes instance.
Cheers,
Dominique
|
|
From: John H. <jdh...@ac...> - 2005-02-02 19:04:55
|
>>>>> "Delbert" == Delbert D Franz <iq...@so...> writes:
Delbert> I just did another test. mx2num fails for dates prior to
Delbert> 1970 because it uses the magical Unix seconds from epoch.
Delbert> We need mx2num to work for the whole range of dates for
Delbert> which date2num works-at least that is my vote. Delbert
Delbert> On Wednesday 02 February 2005 10:10 am, Delbert D. Franz wrote:
If you feel up to making an mx2num that satisfies these requirements,
I'm happy to include it as a patch.
JDH
|
|
From: Delbert D. F. <iq...@so...> - 2005-02-02 18:31:33
|
I just did another test. mx2num fails for dates prior to 1970 because
it uses the magical Unix seconds from epoch. We need mx2num to work
for the whole range of dates for which date2num works-at least that
is my vote.
Delbert
On Wednesday 02 February 2005 10:10 am, Delbert D. Franz wrote:
> John, thanks for the updated mx2num but I still found something
> puzzling: date2num takes the timezone from the matplotlibrc file
> but mx2num must take it from some info on my machine. There is a
> consistent seven hour difference between the two even though the
> datetime instances give exactly the same time.
>
> I need to point out that in my applications I have no interest in
> the time zone and I want it always treated as if I am
> on the Greenwich Meridian. Here's why: My simulation software
> has used what is essentially the modified Julian Day number
> from astronomy with a zero point around 1878 or so. I just add
> the fraction of the day to it. This works
> fine in my applications because there is no data to run the model
> earlier than about the 1900! Also I have users in different time
> zones sending me test cases and it would be a mess to have to
> somehow always adjust for time zone. Thus I have effectively
> computed the day numbers relative to the local time zone always.
>
> Another benefit is that there is a fixed offset between my
> time scale and the one used in plot_dates. Makes life a little
> simpler.
>
> Questions:
>
> 1. Should mx2num use a different time zone than does date2num?
>
> 2. If so, how do I get mx2num at its invocation only, to use
> the time zone in the matplotlibrc file? I assume I have
> to use the set_tzinfo method right before mx2num is invoked
> and then use set_tzinfo again right after to return to
> what it was.
>
> Heres an example test file:
>
> from matplotlib.dates import mx2num, date2num
> import datetime
> import mx.DateTime
>
> for ihr in xrange(24):
> yr = 2003
> mn = 10
> day = 20
> imin = 30
> second = 0.0
> isec = 0
>
> dt = mx.DateTime.DateTime(yr, mn, day, ihr, imin, second)
> dt2 = datetime.datetime(yr, mn, day, ihr, imin, isec)
> print 'hour=', ihr
> print 'mx dt=',dt
> print 'dt2=', dt2
> diff = mx2num(dt) - date2num(dt2)
> print 'mx2num(dt)=',mx2num(dt)
> print 'date2num(dt2) =', date2num(dt2)
> print 'difference=', diff*24.0
> print ' '
>
>
> Here's some output at my time zone:
>
>
> hour= 0
> mx dt= 2003-10-20 00:30:00.00
> dt2= 2003-10-20 00:30:00
> mx2num(dt)= 731508.3125
> date2num(dt2) = 731508.020833
> difference= 6.99999999907
>
> hour= 1
> mx dt= 2003-10-20 01:30:00.00
> dt2= 2003-10-20 01:30:00
> mx2num(dt)= 731508.354167
> date2num(dt2) = 731508.0625
> difference= 6.99999999907
>
> hour= 2
> mx dt= 2003-10-20 02:30:00.00
> dt2= 2003-10-20 02:30:00
> mx2num(dt)= 731508.395833
> date2num(dt2) = 731508.104167
> difference= 7.00000000186
>
> hour= 3
> mx dt= 2003-10-20 03:30:00.00
> dt2= 2003-10-20 03:30:00
> mx2num(dt)= 731508.4375
> date2num(dt2) = 731508.145833
> difference= 6.99999999907
>
> hour= 4
> mx dt= 2003-10-20 04:30:00.00
> dt2= 2003-10-20 04:30:00
> mx2num(dt)= 731508.479167
> date2num(dt2) = 731508.1875
> difference= 6.99999999907
>
> hour= 5
> mx dt= 2003-10-20 05:30:00.00
> dt2= 2003-10-20 05:30:00
> mx2num(dt)= 731508.520833
> date2num(dt2) = 731508.229167
> difference= 7.00000000186
>
> Delbert
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Delbert D. F. <iq...@so...> - 2005-02-02 18:10:57
|
John, thanks for the updated mx2num but I still found something
puzzling: date2num takes the timezone from the matplotlibrc file
but mx2num must take it from some info on my machine. There is a
consistent seven hour difference between the two even though the
datetime instances give exactly the same time.
I need to point out that in my applications I have no interest in
the time zone and I want it always treated as if I am
on the Greenwich Meridian. Here's why: My simulation software
has used what is essentially the modified Julian Day number
from astronomy with a zero point around 1878 or so. I just add
the fraction of the day to it. This works
fine in my applications because there is no data to run the model
earlier than about the 1900! Also I have users in different time
zones sending me test cases and it would be a mess to have to
somehow always adjust for time zone. Thus I have effectively
computed the day numbers relative to the local time zone always.
Another benefit is that there is a fixed offset between my
time scale and the one used in plot_dates. Makes life a little
simpler.
Questions:
1. Should mx2num use a different time zone than does date2num?
2. If so, how do I get mx2num at its invocation only, to use
the time zone in the matplotlibrc file? I assume I have
to use the set_tzinfo method right before mx2num is invoked
and then use set_tzinfo again right after to return to
what it was.
Heres an example test file:
from matplotlib.dates import mx2num, date2num
import datetime
import mx.DateTime
for ihr in xrange(24):
yr = 2003
mn = 10
day = 20
imin = 30
second = 0.0
isec = 0
dt = mx.DateTime.DateTime(yr, mn, day, ihr, imin, second)
dt2 = datetime.datetime(yr, mn, day, ihr, imin, isec)
print 'hour=', ihr
print 'mx dt=',dt
print 'dt2=', dt2
diff = mx2num(dt) - date2num(dt2)
print 'mx2num(dt)=',mx2num(dt)
print 'date2num(dt2) =', date2num(dt2)
print 'difference=', diff*24.0
print ' '
Here's some output at my time zone:
hour= 0
mx dt= 2003-10-20 00:30:00.00
dt2= 2003-10-20 00:30:00
mx2num(dt)= 731508.3125
date2num(dt2) = 731508.020833
difference= 6.99999999907
hour= 1
mx dt= 2003-10-20 01:30:00.00
dt2= 2003-10-20 01:30:00
mx2num(dt)= 731508.354167
date2num(dt2) = 731508.0625
difference= 6.99999999907
hour= 2
mx dt= 2003-10-20 02:30:00.00
dt2= 2003-10-20 02:30:00
mx2num(dt)= 731508.395833
date2num(dt2) = 731508.104167
difference= 7.00000000186
hour= 3
mx dt= 2003-10-20 03:30:00.00
dt2= 2003-10-20 03:30:00
mx2num(dt)= 731508.4375
date2num(dt2) = 731508.145833
difference= 6.99999999907
hour= 4
mx dt= 2003-10-20 04:30:00.00
dt2= 2003-10-20 04:30:00
mx2num(dt)= 731508.479167
date2num(dt2) = 731508.1875
difference= 6.99999999907
hour= 5
mx dt= 2003-10-20 05:30:00.00
dt2= 2003-10-20 05:30:00
mx2num(dt)= 731508.520833
date2num(dt2) = 731508.229167
difference= 7.00000000186
Delbert
|
|
From: John H. <jdh...@ac...> - 2005-02-02 15:46:05
|
>>>>> "Delbert" == Delbert D Franz <dd...@lk...> writes:
Delbert> I am now able to create multiple figures, each with one
Delbert> or more subplots with my software. What a great
Delbert> collection of software. Thanks for all the work.
Great, glad it helped. I was pretty sure that was the answer.
Delbert> I tried using mx.datetime to create an mx.datetime
Delbert> instance which worked fine. However, mx2num() fails with
Delbert> python claiming an undefined mxdates. I checked the
Delbert> source and found only one mxdates. No idea how it should
Delbert> be defined. In the mean time I am using a datetime
Delbert> instance but I lose a small bit of precision with only
Delbert> integer seconds.
Oops, replace mx2num in matplotlib/dates.py with
def mx2num(mxdates):
"""
Convert mx datetime instance (or sequence of mx instances) to the
new date format,
"""
scalar = False
if not iterable(mxdates):
scalar = True
mxdates = [mxdates]
ret = epoch2num([m.ticks() for m in mxdates])
if scalar: return ret[0]
else: return ret
Thanks for the report!
JDH
|
|
From: John H. <jdh...@ac...> - 2005-02-02 14:39:11
|
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
Nils> Hi all, Is it possible to rule the distance between subplots
Nils> ? How about the setting of x axis tic marks ? The default
Nils> is not very promising (see bsp5.py)
For axes placement, see also the axes command, which gives you a finer
degree of control than subplot.
For the tick labeling, you are right, the default xticklabels in your
example are a mess. We'll take a look at this case to see where the
bug is. In my experience, getting default ticking and labeling right
is hard, and matplotlib has gotten a lot better at it since the bad
old days but there is a ways to go.
Until we get this fixed, you do have the option of using a custom
ticker, which is explained in the user's guide Chapter 5, and
illustrated in examples/custom_ticker1.py in the matplotlib src
distro.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-02-02 14:34:01
|
>>>>> "Cory" == Cory Davis <cd...@st...> writes:
Cory> try title('$\mu='+str(p[ic-1])+'$') Cory.
Make sure you quote the string as a raw string with the "r" prefix. I
also suggest format strings for formatting numeric values, something
like
title(r'$\mu=%1.2f$' % p[ic-1])
^
JDH
|
|
From: Darren D. <dd...@co...> - 2005-02-02 13:24:27
|
On Wednesday 02 February 2005 04:51 am, Steve Chaplin wrote: > > When resizing the FigureCanvas on my system I notice: > GTK sets a FigureCanvas size that can only be increased. > QtAgg sets a FigureCanvas size that can be increased or decreased > TkAgg sets a FigureCanvas size that can be increased or decreased to a > minimum (of perhaps 400 x 300 pixels) > Wx I do not have, is it like Qt or Tk or is there a 4th variation? on linux, wx lets me increase or decrease all the way. I wonder if it is different on windows. > > I looked at changing GTK so the FigureCanvas could be decreased a while > ago but the problem is that while the axes scale/shrink nicely the text > stays the same size and becomes misaligned or clipped and gives an odd > looking graph. Perhaps thats why Tk allows you shrink the window but > only to a certain size. > > Matplotlib currently has 3 (or more) ways of handling window resizing, > which one of these behaviours is 'correct' or most desirable? > I think the most desirable for interactive use would be to allow scaling, but if it doesn't scale properly, I think the current behavior is appropriate. I guess I just didnt notice it before now. Darren |
|
From: Cory D. <cd...@st...> - 2005-02-02 12:55:43
|
try title('$\mu='+str(p[ic-1])+'$')
Cory.
On Wed, 2005-02-02 at 12:48, Nils Wagner wrote:
> Hi all,
>
> I am going to change the title of each subplot with respect to the
> actual value of \mu within a loop.
> How can I do that ?
>
> p = array(([0.1,0.01,0.001,0.0001]))
> ic = 1
> for mu in p:
> title('$\mu=$'+str(p[ic-1])) # This version doesn't work
> ic = ic + 1
>
> Nils
>
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
))))))))))))))))))))))))))))))))))))))))))))
Cory Davis
Meteorology
School of GeoSciences
University of Edinburgh
King's Buildings
EDINBURGH EH9 3JZ
ph: +44(0)131 6505092
fax +44(0)131 6505780
cd...@st...
co...@me...
http://www.geos.ed.ac.uk/contacts/homes/cdavis
))))))))))))))))))))))))))))))))))))))))))))
|
|
From: Cory D. <cd...@st...> - 2005-02-02 12:54:05
|
Hi Nils, On Wed, 2005-02-02 at 12:22, Nils Wagner wrote: > Hi all, > > Is it possible to rule the distance between subplots ? > How about the setting of x axis tic marks ? The default is not very > promising > (see bsp5.py) Here is a function I use instead of the matplotlib subplot. It has the same arguments as the matlab version except for the figpos argument, which determines where in the figure your array of plots goes, and the axpos argument, which determines where in each panel the axes goes. It returns an axes object, which you can use to set xticks etc. Hope this helps, Cheers, Cory. |
|
From: Nils W. <nw...@me...> - 2005-02-02 12:48:16
|
Hi all,
I am going to change the title of each subplot with respect to the
actual value of \mu within a loop.
How can I do that ?
p = array(([0.1,0.01,0.001,0.0001]))
ic = 1
for mu in p:
title('$\mu=$'+str(p[ic-1])) # This version doesn't work
ic = ic + 1
Nils
|
|
From: John H. <jdh...@ac...> - 2005-02-02 12:35:55
|
>>>>> "dimitri" == dimitri pater <dim...@gm...> writes:
dimitri> hello, I want to create a barchart on a website, somebody
dimitri> advised me to use matplotlib and it does look very
dimitri> promising. The problem that I now face is that I can't
dimitri> seem to get things right, the following code results in
dimitri> an import error:
dimitri> from cgi import escape
dimitri> try: import cgitb cgitb.enable() except: sys.stderr =
dimitri> sys.stdout
dimitri> # test import pylab import pylab
dimitri> Does this mean that the webserver doesn't have pylab
dimitri> installed or am I missing something? (bit of a newbie in
dimitri> this area, so please bear with me...)
To run matplotlib in a web app server, you will probably want to set
"backend : Agg" in your .matplotlibrc file. matplotlib supports
output to a variety of image devices and GUIs, and agg is a good
choice to make nice PNGs for app servers. See
http://matplotlib.sf.net/.matplotlibrc. On a standard linux install,
this file would be placed in /usr/share/matplotlib/.matplotlibrc, and
i can be copied to your HOME directory and edited. Often times HOME
is not net in an app server environment. You either need to set it,
or take a look at
http://groups-beta.google.com/group/comp.lang.python/msg/09eac15acef8ee40,
which describes some possible solutions. matplotlib needs a directory
that is can write to to save some font cache information, and the link
above describes the role of the environment variables HOME and
MATPLOTLIBDATA in the choices matplotlib makes.
As for your error, I suggest taking a minimal matplotlib script
import pylab
pylab.plot([1,2,3])
pylab.savefig('test.png')
and running it with
> python myscript.py --verbose-helpful
and report any output and/or errors the script produces. Saying that
you got an import error, without giving us the exact error message`,
doesn't help us help you.
Good luck!
JDH
|
|
From: Nils W. <nw...@me...> - 2005-02-02 12:23:15
|
Hi all,
Is it possible to rule the distance between subplots ?
How about the setting of x axis tic marks ? The default is not very
promising
(see bsp5.py)
Any pointer or suggestion how to improve my example are welcome.
Thanks in advance.
Nils
|
|
From: dimitri p. <dim...@gm...> - 2005-02-02 10:34:40
|
hello,
I want to create a barchart on a website, somebody advised me to use
matplotlib and it does look very promising. The problem that I now
face is that I can't seem to get things right, the following code
results in an import error:
from cgi import escape
try:
import cgitb
cgitb.enable()
except:
sys.stderr = sys.stdout
# test import pylab
import pylab
Does this mean that the webserver doesn't have pylab installed or am I
missing something? (bit of a newbie in this area, so please bear with
me...)
best regards,
Dimitri
--
Please visit dimitri's website: www.serpia.com
|
|
From: Steve C. <ste...@ya...> - 2005-02-02 09:50:14
|
On Tue, 2005-02-01 at 20:17 -0800, Darren Dale wrote: > I am working in interactive mode, with the GTKAgg backend. When I make a > figure, I was not able to resize it on the screen. I tried changing my dpi > and default figure size in .matplotlibrc, and now I can increase the figure > size, but not decrease it passed its original size. I changed > my .matplotlibrc back to its original configuration, and the same behavior > persists: I can increase the figure size, but not decrease it passed the > original size. This is also true for the GTK backend, but not for WXAgg. > > I rebuilt my atlas libraries today, along with Numeric, and numarray. I dont > think that should have anything to do with it, but I rebuilt gtk+, pygtk, and > matplotlib just in case. All are the latest version. > > Everything else seems to work, minimizing, maximizing, closing, but not > resizing. Does anyone have a suggestion as to what is wrong, or what I might > check? Its related to the way the FigureCanvasGTK is implemented using self.set_size_request() - it sets the widgets minimum size. When resizing the FigureCanvas on my system I notice: GTK sets a FigureCanvas size that can only be increased. QtAgg sets a FigureCanvas size that can be increased or decreased TkAgg sets a FigureCanvas size that can be increased or decreased to a minimum (of perhaps 400 x 300 pixels) Wx I do not have, is it like Qt or Tk or is there a 4th variation? I looked at changing GTK so the FigureCanvas could be decreased a while ago but the problem is that while the axes scale/shrink nicely the text stays the same size and becomes misaligned or clipped and gives an odd looking graph. Perhaps thats why Tk allows you shrink the window but only to a certain size. Matplotlib currently has 3 (or more) ways of handling window resizing, which one of these behaviours is 'correct' or most desirable? Regards Steve |
|
From: Delbert D. F. <dd...@lk...> - 2005-02-02 04:51:45
|
John,
Thanks for the tip. I had thought of checking that as well as I
drifted off to sleep. That was it-in spades. I had
input two different subplot codes but somehow only one got saved.
Then I got suckered in by the simplicity of initializing
the list using [ 2*Subpdata() ] where Subpdata is a class
defining the various attributes of a subplot in my program.
However, I soon found out that this made my problem worse;
Python went into an endless loop. Again, this gave me two
subplot codes but they were the same. The simple list
initialization binds the same instance object to the two
list entries. Not what I wanted. After using a for statement
to initialize, I got my two subplots.
I am now able to create multiple figures, each with one or more
subplots with my software. What a great collection of software.
Thanks for all the work.
I tried using mx.datetime to create an mx.datetime instance
which worked fine. However, mx2num() fails with python
claiming an undefined mxdates. I checked the source and
found only one mxdates. No idea how it should be defined.
In the mean time I am using a datetime instance but I lose
a small bit of precision with only integer seconds.
Delbert
On Tuesday 01 February 2005 05:38 am, John Hunter wrote:
> >>>>> "Delbert" == Delbert D Franz <dd...@lk...> writes:
>
> Delbert> I have made great progress with my GUI to plot
> Delbert> time-series files from my unsteady-flow modeling
> Delbert> software. It works when I have one subplot per figure
> Delbert> but I have not been able to get two subplots (211 and
> Delbert> 212) to work. Only the lower subplot appears and the
> Delbert> trace or line assigned to the upper subplot (211) appears
> Delbert> in the lower subplot. The space for the upper subplot
> Delbert> appears as blank space in the figure.
>
> You code looks correct on first glance (except did you mean tht title
> to be in the loop?) . My guess is your data structure has a bug in
> it. Add a print statement and make sure the loc code is as you think
> it is.
>
> print fg.fgs[ifg].sp[isp].loc_code
> ax = f.add_subplot(fg.fgs[ifg].sp[isp].loc_code)
>
> If they are correct, you need to compose a minimum, free standing
> script that replicates your problem and I can take a look.
>
> Hope this helps,
> JDH
>
>
|
|
From: Darren D. <dd...@co...> - 2005-02-02 01:50:44
|
I am working in interactive mode, with the GTKAgg backend. When I make a figure, I was not able to resize it on the screen. I tried changing my dpi and default figure size in .matplotlibrc, and now I can increase the figure size, but not decrease it passed its original size. I changed my .matplotlibrc back to its original configuration, and the same behavior persists: I can increase the figure size, but not decrease it passed the original size. This is also true for the GTK backend, but not for WXAgg. I rebuilt my atlas libraries today, along with Numeric, and numarray. I dont think that should have anything to do with it, but I rebuilt gtk+, pygtk, and matplotlib just in case. All are the latest version. Everything else seems to work, minimizing, maximizing, closing, but not resizing. Does anyone have a suggestion as to what is wrong, or what I might check? Thanks, Darren |
|
From: Brendan S. <bre...@ya...> - 2005-02-02 00:39:58
|
> See my previous message about building matplotlib on OS-X. Now that
> I've done that, I need to give it to some of my coworkers that don't
> have the dev tools installed, and are aghast at the idea of typing
> ./configure; make, make install.
>
> So, how do I make a binary distro?
Wow, serendipity!
I was just sitting down to the challenge of building matplotlib on os-x
myself. Please keep the list(s) updated on your progress. I would
certainly prefer running an install script or mpkg than trying to
compile all the dependencies.
*sending karma,
Brendan
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
|
|
From: Bob I. <bo...@re...> - 2005-02-02 00:14:19
|
On Feb 1, 2005, at 19:04, Chris Barker wrote: > See my previous message about building matplotlib on OS-X. Now that > I've done that, I need to give it to some of my coworkers that don't > have the dev tools installed, and are aghast at the idea of typing > ./configure; make, make install. > > So, how do I make a binary distro? I know I can get distutils to do > it, but it won't included the needed extra libs: > > freetype > libpng > zlib zlib ships with OS X > It seems I have three options: > > 1) Just give them a tarball of the compiled libs, ready to be dropped > into /usr/local (I don't like that option, what If I clobber > something?) > > 2) Somehow put the libs inside the matplotlib distro That's possible > 3) Statically link those libs into the matplotlib extensions But this is better > I have no idea how to do 2 or 3, but could probably figure it out. This is (3) Make sure you don't have libpng.dylib or libfreetype.dylib sitting around on your link paths... Build them like this: ./configure --disable-shared --enable static Make sure you only have libpng.a and libfreetype.a on your link paths. It will link statically. > What do folks suggest? Any pointers? After you've linked matplotlib statically, use bdist_mpkg from py2app to make a redistributable .pkg installer for it. After installing py2app, you should have a tool in /usr/local/bin called "bdist_mpkg" that will Just Do It without any setup.py modifications to the target lib... so go into the matplotlib directory, type bdist_mpkg, and cross your fingers that a dist/matplotlib-xx.pkg will appear. If you have any problems beyond that, let me know. -bob |
|
From: Larry M. <Lar...@na...> - 2005-02-02 00:06:28
|
Chris, An alternative way to get freetype, libpng and zlib for OS X is to use the the i-Installer (http://ii2.sourceforge.net/) distribution application. It is primarily for TeX on OS X, but it provides several other useful binaries for OS X. Larry On Feb 1, 2005, at 3:50 PM, Chris Barker wrote: > Hi all, > > I just got matplotlib working on my box, so I thought I'd post this, > so that it will be in the archives, and because I'd like others to try > it and let me know if it doesn't work for you. > > > One question for the knowledgeable folks here: > > I have /usr/include/zlib.h on my system, but I have no idea where I > got it. I do know that it isn't on other systems in my office without > the dev tools. Did it come with the dev tools, or something else I > installed? > > Anyway, here's what worked for me: > > Installing matplotlib on OS-X (10.3.7) > > Here are my notes as to what it took to get matplotlib (0.71) > installed and working on OS-X. I have so far kept a fink-free system, > so that's what I've done here as well. I use it with the AGG back end > for generating images for a web site, and hopefully with the wx > backend for interactive use and embedding in wx Applications. > > 1) Requirements: > ------------------------------------------- > According to the matplotlib install docs > (http://matplotlib.sourceforge.net/installing.html), you need the > following: > > freetype (>= 2.1.7) > libpng > zlib > > Personally, I've been avoiding Fink, as it doesn't seem to play well > with the rest of OS-X, including the Apple supplied Python, so I've > looked elsewhere for these libs. > > a) Freetype: > I seem to have it in: > > /usr/X11R6/include/freetype2 > > I don't think I installed it myself, so it probably came with Apple's > X11, Which I did install. > > However, I seemed to be having problems with that version, so I > looked, and it seems to be: > > libfreetype.6.3.dylib > > Given that freetype2 is currently at version 2.1.9, I have no idea > what to make of that! So off to sourceforge to get a new freetype: > > http://freetype.sourceforge.net/index2.html > > where I got: > > freetype-2.1.9.tar.gz > > Following the instructions in docs/INSTALL.UNX: > > $ ./configure > $ make > $ sudo make install > > That puts it in /usr/local/..., which is a good place for it. > > b) zlib: > I have: > /usr/include/zlib.h > > I don't know where I might have gotten it, but there it is. > > NOTE: I checked on another system in my office, and it doesn't have > zlib. It also doesn't have any developer tools installed, so you > couldn't build anything on it anyway. If zlib comes with XCode tools, > anyone who can build should have it. It also may have come with some > other package I've installed, but I have no idea what. Let me know if > you know. > > c) libpng: > This, I didn't have on my system, except inside the wxWidgets source > tree, so I went looking for it. > > Note that you need zlib to compile libpng, so make sure you have that > first. > > I did a google search for "libpng OS-X". I found: > > http://www.libpng.org/pub/png/pngcode.html > > Which led me to the libpng sourceforge site. > > From there I downloaded: > > libpng-1.2.8.tar.gz > > unpacked it, and opened a terminal in the libpng-1.2.8 directory, and > did: > > $ cp scripts/makefile.darwin ./makefile > > (note that according to the INSTALL, there is supposed to be a > makefile.macosx, but it wasn't there) > > I took a look in the makefile, and found: > > ZLIBLIB=/usr/local/lib > ZLIBINC=/usr/local/include > > Which is not where zlib is on my system. However, while I can find > zlib.h, I couldn't fine the actual lib, so I tried make without > changing anything. > > $ make > > Which seemed to work fine. zlib must be installed in a standard > location, and gcc found it. > > $ sudo make install > > to install the lib into /usr/local/ (this was specified in the > makefile, and it's a good place for it) > > $ make test > and > $ ./pngtest pngnow.png > > Which both seemed to pass. > > d) Numeric or numarray: > > I already have Numeric installed, from Bob Ippolito's PIMP (MacPython > Package Manager) repostitory. (www.undefined.org/python) > > 2) Building matplotlib > --------------------------------------------------------- > First, I took a look at the matplotlib setup.py. It had "auto" for the > back-end flags, so I thought I would give it a try that way: > > $python setup.py build > > That worked! > $ sudo python setup.py install > > 4) And now to test! > > $python > > >>> import pylab > Could not open font file /Library/Fonts/NISC18030.ttf > No module named pygtk > PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib > backends > > This turns out to be because the matlabrc file sets the GTKAgg back > end as the default. You have two choices. > > 1) you can set the back end before importing pylab. > >>> import matplotlib > >>> matplotlib.use('Agg') > >>> import pylab > > This works fine > > 2) Edit the matplotlibrc file. I found it in: > /System/Library/Frameworks/Python.framework/Versions/2.3/share/ > matplotlib/.matplotlibrc > > Change the line: > backend : GTKAgg # the default backend > to > backend : Agg # the default backend > > And you're all set to make images for the web, etc. > > I'm going to leave getting it to work with wxPython for another day. > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > NOAA/OR&R/HAZMAT (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chr...@no... > _______________________________________________ > Pythonmac-SIG maillist - Pyt...@py... > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Larry Meyn Aerospace Operations Modeling Office M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Lar...@na... Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail Larry Meyn Aerospace Operations Modeling Office M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Lar...@na... Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail |
|
From: Chris B. <Chr...@no...> - 2005-02-02 00:03:02
|
Hi all,
See my previous message about building matplotlib on OS-X. Now that I've
done that, I need to give it to some of my coworkers that don't have the
dev tools installed, and are aghast at the idea of typing ./configure;
make, make install.
So, how do I make a binary distro? I know I can get distutils to do it,
but it won't included the needed extra libs:
freetype
libpng
zlib
It seems I have three options:
1) Just give them a tarball of the compiled libs, ready to be dropped
into /usr/local (I don't like that option, what If I clobber something?)
2) Somehow put the libs inside the matplotlib distro
3) Statically link those libs into the matplotlib extensions
I have no idea how to do 2 or 3, but could probably figure it out.
What do folks suggest? Any pointers?
Also, what's up with the Packman databases? I think I saw a note from
Bob saying he isn't maintaining his. Jack, are you maintaining yours? If
either of these is being maintained, how would I get matplotlib into it?
thanks,
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: John H. <jdh...@ac...> - 2005-02-02 00:00:42
|
>>>>> "Chris" == Chris Barker <Chr...@no...> writes:
Chris> 1) It seems to me that it belongs as a figure (or canvas, I
Chris> suppose) method.
Yep, I agree. savefig is now a figure method. It stores a ref to
its canvas, which you can access (you probably don't need to) as
fig.canvas
The pylab interface function savefig now forwards the call to
Figure.savefig.
Chris> 2) Most critically, it uses the "current figure". I can see
Chris> where this makes sense with Matlab style interactive use,
Chris> but in a program, I may be building more than one figure at
Chris> a time, and it makes more sense to me to do something like:
Yes, managing the current state is one of the jobs of pylab. But I
don't mind tweaking a few things so you can use pylab w/o the current
state features.
Chris> Sorry to come off as being critical. I am very impressed
Chris> with your work on matplotlib. There are been many promising
Chris> starts to a python plotting package, and NONE of them have
Chris> come even close to what you've done with matplotlib. That's
No worries, I take your suggestions in the right way, as constructive
criticism. Thanks for the vote of confidence!
Chris> I hope as I get more familiar with matplotlib, I'll start
Chris> to contribute code, rather than just questions and
Chris> criticism.
Chris> John, do you want patches that add-to/improve the OO
Chris> interface?
Yes, certainly, but these should be made with an eye to backwards
compatibility and it would be great if the changes included
documentation and/or examples, both of which are somewhat lacking for
the OO interface. Documenting what you learn, much as you did for the
OSX install, might be as helpful as any improvements in the API.
Thanks,
JDH
|