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
(5) |
2
(4) |
|
3
|
4
(9) |
5
(4) |
6
(9) |
7
(13) |
8
(11) |
9
(7) |
|
10
(7) |
11
(22) |
12
(19) |
13
(11) |
14
(20) |
15
(21) |
16
(1) |
|
17
(1) |
18
(8) |
19
(3) |
20
(5) |
21
(5) |
22
(9) |
23
(3) |
|
24
(3) |
25
(14) |
26
(12) |
27
(29) |
28
(18) |
29
(11) |
30
(2) |
|
From: Chris B. <Chr...@no...> - 2005-04-28 17:18:54
|
Dimitri D'Or wrote:
> I was surprised to discover recently that the RESHAPE function in Python
> and Matlab do not yield the same result. In fact, Python reshapes along
> the rows while Matlab does it along the columns.
> Does anyone have an explanation for this?
AFAIK, the reason is that MATLAB has Fortran in it's history, ans thus
uses Fortran semantics laying out arrays, whereas Numeric and numarray
use C semantics for laying out arrays.
NumPy is not Matlab, nor is it trying to be.
> Is it possible to change the
> axis priority like e.g., in concatenate?
It doesn't look like it, from the docs. The reason is that re-shape
doesn't move any data around in memory, it just changes the way the data
is interpreted.
What you want really is a transpose, as you've discovered, but think
about whether you really want that... it might make more sense to just
stick with NumPy's natural ordering.
This, by the way is a Numeric or numarray question, you'd be best off
referring to the docs for those packages, and asking questions on the
numpy-discussion list.
-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-04-28 13:59:44
|
>>>>> "steve" == steve schmerler <el...@gm...> writes:
steve> Hi help(plot) states something like
steve> [...] If you make multiple lines with one plot
steve> command, the kwargs apply to all those lines, eg plot(x1,
steve> y1, x2, y2, antialising=False) Neither line will be
steve> antialiased. [...]
steve> but the MPL manual says "antialiased" and "aa"
steve> respectively, which works. "antialising" gives
steve> TypeError: There is no line property "antialising"
steve> However, if I set antialising to False in .matplotlibrc or
steve> try
steve> plot(...,aa=False)
steve> nothing happens. The plot is still antialised.
Hmm, you've found two bugs here. First, the docstring is incorrect:
"antialiasing" should read "antialiased". Note you can use the set
command to get the real information, since it actually inspects the
object methods
>>> line = plot([1,2,3])
>>> set(line)
The second bug is that agg is ignoring the aa property. I recently
refactored graphics context property handling in agg and forgot to
call the gc._set_antialiased method in the constructor in
_backend_agg.cpp. This is fixed in CVS.
While I was poking around I also found another bug! In interactive
mode with the TkAgg backend, the draw operation is being called twice
with each plot, halving the performance. Since tk is already pokey,
this is a problem -- and fortunately should be a relatively easy fix.
If you put a print statement in matplotlib.figure.Figure.draw, and
then set interactive : True and backend :TkAgg and fire up a standard
python shell and do
>>> from pylab import plot
>>> plot([1,2,3])
You'll see that draw is called twice. We've had a devil of a time
getting the tk stuff just right in backend_tkagg -- it seems like the
same bugs keep recurring in different guises.
We should be able to get this sorted out for a bug-fix release in the
near future, probably next week.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-04-28 13:30:10
|
>>>>> "Nicolas" == Nicolas CHARVIN <Nic...@un...> writes:
Nicolas> Hi, I am trying to plot an histogram, but i cannot set
Nicolas> 'yscale' to 'log'.
matplotlib transfers the vertices of the rectangles that make up the
bar, which by default have their bottom at 0.
Use the bottom kwarg, eg
N,b,pb = hist(x, bottom=0.001)
set(gca(), yscale='log')
See also http://matplotlib.sf.net/examples/log_bar.py
JDH
|
|
From: Dimitri D'O. <dim...@fs...> - 2005-04-28 13:12:56
|
Hello,
I was surprised to discover recently that the RESHAPE function in Python and
Matlab do not yield the same result. In fact, Python reshapes along the rows
while Matlab does it along the columns.
For example, the Matlab code:
>> a=(0:19);
>> reshape(a,5,4)
ans =
0 5 10 15
1 6 11 16
2 7 12 17
3 8 13 18
4 9 14 19
And the Python equivalent:
>>> a=arange(20)
>>> reshape(a,(5,4))
[[ 0, 1, 2, 3, ]
[ 4, 5, 6, 7, ]
[ 8, 9,10,11, ]
[12,13,14,15,]
[16,17,18,19,]]
To obtain the same result, I should write:
>>> transpose(reshape(a,(4,5)))
Does anyone have an explanation for this? Is it possible to change the axis
priority like e.g., in concatenate?
Thank you,
Dimitri D'Or
|
|
From: Nicolas C. <Nic...@un...> - 2005-04-28 13:05:44
|
Hi,
I am trying to plot an histogram, but i cannot set 'yscale' to 'log'.
>>> mu, sigma =3D 100, 15
>>> x =3D mu + sigma*randn(10000)
>>> N,b,pb =3D hist(x)
>>> set(pb, "facecolor", 'r')
>>> set(gca(), 'yscale', 'log')
File "C:\Python23\Lib\site-packages\matplotlib\patches.py", line 131, in=
=20
draw
tverts =3D self._transform.seq_xy_tups(verts)
ValueError: Domain error on nonlinear Transformation::seq_xy_tups=20
operator()(thisx, thisy)
kabang !
Does anybody know what's wrong with this?
Thanks in advance
nicolas
--
Nic...@un...
LMOPS - Lab. Mat=E9riaux Organiques =E0 Propri=E9t=E9s Sp=E9cifiques
B=E2t IUT - Universit=E9 de Savoie
73376 LE BOURGET DU LAC CEDEX
Tel: 04-79-75-86-53
http://www.univ-savoie.fr/labos/lmops
|
|
From: steve s. <el...@gm...> - 2005-04-28 09:35:17
|
Hi
help(plot) states something like
[...]
If you make multiple lines with one plot command, the kwargs apply
to all those lines, eg
plot(x1, y1, x2, y2, antialising=False)
Neither line will be antialiased.
[...]
but the MPL manual says "antialiased" and "aa" respectively, which works. "antialising" gives
TypeError: There is no line property "antialising"
However, if I set antialising to False in .matplotlibrc or try
plot(...,aa=False)
nothing happens. The plot is still antialised.
Cheers,
Steve
--
Man is the best computer we can put aboard a spacecraft ... and the only one that can be
mass produced with unskilled labor. - Wernher von Braun
|
|
From: Mark E. <ma...@st...> - 2005-04-28 09:03:15
|
Sorry - problem solved. I was 0.01 versions behind on the computer I was using. Thanks for adding such a great feature! - Mark On Apr 28, 2005, at 1:43 AM, Mark Engelhardt wrote: > Hi, > > I am trying to construct coloured contour maps, but when I do: > > from pylab import * > > clabel is not there. Was this removed? The docs suggest that clabel > is part of the pylab module. > > thanks, > Mark > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ........................................................................ ..... Mark Engelhardt Pande and Herschlag groups S257 Clarke Center, 318 Campus Drive Stanford University, Stanford, CA 94305 ma...@st... http://www.stanford.edu/~marke/ |
|
From: Mark E. <ma...@st...> - 2005-04-28 08:43:41
|
Hi, I am trying to construct coloured contour maps, but when I do: from pylab import * clabel is not there. Was this removed? The docs suggest that clabel is part of the pylab module. thanks, Mark |
|
From: Karsten W. J. <kw...@fy...> - 2005-04-28 06:37:38
|
Dear John, Thanks for the help. Now it works! Karsten. On Tue, 2005-04-26 at 20:38 -0500, John Hunter wrote: > >>>>> "Karsten" == Karsten Wedel Jacobsen <kw...@fy...> writes: > > Karsten> After that the build and install went smoothly. But now > Karsten> if I try to import pylab I get the following error: > Karsten> pixbuf_get_pixels_array ImportError: No module named > Karsten> _nc_backend_gdk > > Karsten> As far as I can see it is still trying to use some > Karsten> gtk-stuff? > > This is a bit of annoyance in the mpl setup. The backend that is > chosen at runtime is determined by the rc file (see > http://matplotlib.sf.net/.matplotlibrc) and the default backend in the > rc file is GTKAgg. Even if you turn GTK compilation off in setup.py, > the rc file still determines which backend is selected. You need to > copy that file from its default location (eg > /usr/share/matplotlib/.matplotlibrc) to your HOME directory and edit > the 'backend' setting to something else, eg TkAgg, WXAgg or QtAgg. > > While debugging, it is helpful to create a simple script like > > import pylab > pylab.plot([1,2,3]) > pylab.show() > > and run it with > > > python myscript.py --verbose-helpful > > which will show you which rc file is being loaded, which backend is > selected, what mpl version you are using, and so on. > > > Should help, > JDH > > PS: the bug in pygtk2.4 in fedora core 3 is quite ease to fix. You > simply have to replace typename with another name like typename_ or > some other name as described in the FAQ. |
|
From: Chris B. <Chr...@no...> - 2005-04-28 04:18:34
|
Rich Drewes wrote: > That said, since my script never actually tried to do some display, it > would be spiffy if matplotlib postponed any X oriented stuff that accesses > the display until the user actually requests a show(). That way, if the > script just does a savefig(.ps) at the end as mine did, things would Just > Work. I'm just guessing here, but I bet the problem comes up when importing pylab, not matplotlib. The pylab interface was designed to be an easy to use interface for interactive use, ala Matlab. It therefor is expecting to display stuff. For scripts that generate figures for printing or web apps, or whatever, pylab is not really the best option. That being said, most of the effort towards usability has goine into the pylab module, so there is alot of stuff that is easier to do that way. I ahev a goal to create a nice pythonic, OO interface for use in scripting (and would be bad in interactive use either), but haven't really had a chance to work on it. Mostly what it would require is to write helpful handy mnethods that do the things that the pylab procedural interface already does. So far all I've done is make a few suggestions, some of which John has implimented. In the meantime, I use the matplotlib.use() function, and use pylab when I need to. -Chris -Chris |
|
From: Ted D. <ted...@jp...> - 2005-04-28 03:02:58
|
What was the backend set to?
We've seen messages like this from the Qt library (just in our normal C++
work). Qt needs to connect to an X server before it can do pretty much
anything (I presume that it needs fonts, colors, etc). Just importing some
of the backends may build certain objects (like QApplication in the case of
Qt) which may need an X server.
I realize this doesn't actually help you - it's more of an explanation. If
it is Qt that you're using and this is the cause (neither of which I'm sure
of), there may not be a good fix. In our application we tried building the
QApplication with the GUI flag set to false (which stops the X server
connection) but then if someone tries to do display anything it core dumps
- not a very good behavior.
Ted
At 07:04 PM 4/27/2005, Darren Dale wrote:
>Hi Rich,
>
>What happens if you run the script on a windows machine, no ssh?
>
>Darren
>
>
>On Wednesday 27 April 2005 9:28 pm, Rich Drewes wrote:
> > I should add that we were both ssh'd into a Linux machine, he from Windows
> > and I from Linux. So his DISPLAY was not set and mine was. When he ran
> > the script it failed for him, but worked for me, even though the script
> > only did a savefig and never tried to actually show() anything to a
> > screen. Is that expected behavior?
> >
> > Rich
> >
> > On Wed, 27 Apr 2005, Rich Drewes wrote:
> > > Hello,
> > >
> > > I gave a colleague a matplotlib script that generated a .ps output with
> > > savefig, and was surprised when it didn't work for him. I eventually
> > > figured out that since he was a Windows user and didn't have DISPLAY set,
> > > the import of the matplotlib libraries was failing with the error in this
> > > message's subject. I eventually solved the problem by doing
> > > "matplotlib.use('PS')" before the pylab import.
> > >
> > > However, the script never tried to actually display anything, it only
> > > created the plot and did a savefig at the end. So my question is: is
> > > this "could not open display" behavior at import the way things are
> > > supposed to work, or is this a bug? It seems like it would be better to
> > > hold off on the "could not open display" error until someone actually
> > > tried to display something, and if all they did was savefigs, everything
> > > would work fine.
> > >
> > > This is on matplotlib .80.
> > >
> > > Thanks,
> > > Rich
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by: Tell us your software development plans!
> > > Take this survey and enter to win a one-year sub to SourceForge.net
> > > Plus IDC's 2005 look-ahead and a copy of this survey
> > > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> > > _______________________________________________
> > > Matplotlib-users mailing list
> > > Mat...@li...
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Tell us your software development plans!
> > Take this survey and enter to win a one-year sub to SourceForge.net
> > Plus IDC's 2005 look-ahead and a copy of this survey
> > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>--
>Darren S. Dale
>
>Bard Hall
>Department of Materials Science and Engineering
>Cornell University
>Ithaca, NY. 14850
>
>dd...@co...
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Tell us your software development plans!
>Take this survey and enter to win a one-year sub to SourceForge.net
>Plus IDC's 2005 look-ahead and a copy of this survey
>Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
>_______________________________________________
>Matplotlib-users mailing list
>Mat...@li...
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Rich D. <dr...@in...> - 2005-04-28 02:54:58
|
On Wed, 27 Apr 2005, Darren Dale wrote: > What happens if you run the script on a windows machine, no ssh? I don't have any Windows machines to test on :) Based on what John said, I'd guess that the backend would be defaulted to some appropriate Windows backend, and things would work. It was only this particular combination of ssh'ing in to an X based system that failed from Windows. That said, since my script never actually tried to do some display, it would be spiffy if matplotlib postponed any X oriented stuff that accesses the display until the user actually requests a show(). That way, if the script just does a savefig(.ps) at the end as mine did, things would Just Work. Rich |
|
From: Darren D. <dd...@co...> - 2005-04-28 02:04:59
|
Hi Rich,
What happens if you run the script on a windows machine, no ssh?
Darren
On Wednesday 27 April 2005 9:28 pm, Rich Drewes wrote:
> I should add that we were both ssh'd into a Linux machine, he from Windows
> and I from Linux. So his DISPLAY was not set and mine was. When he ran
> the script it failed for him, but worked for me, even though the script
> only did a savefig and never tried to actually show() anything to a
> screen. Is that expected behavior?
>
> Rich
>
> On Wed, 27 Apr 2005, Rich Drewes wrote:
> > Hello,
> >
> > I gave a colleague a matplotlib script that generated a .ps output with
> > savefig, and was surprised when it didn't work for him. I eventually
> > figured out that since he was a Windows user and didn't have DISPLAY set,
> > the import of the matplotlib libraries was failing with the error in this
> > message's subject. I eventually solved the problem by doing
> > "matplotlib.use('PS')" before the pylab import.
> >
> > However, the script never tried to actually display anything, it only
> > created the plot and did a savefig at the end. So my question is: is
> > this "could not open display" behavior at import the way things are
> > supposed to work, or is this a bug? It seems like it would be better to
> > hold off on the "could not open display" error until someone actually
> > tried to display something, and if all they did was savefigs, everything
> > would work fine.
> >
> > This is on matplotlib .80.
> >
> > Thanks,
> > Rich
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Tell us your software development plans!
> > Take this survey and enter to win a one-year sub to SourceForge.net
> > Plus IDC's 2005 look-ahead and a copy of this survey
> > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd...@co...
|
|
From: John H. <jdh...@ac...> - 2005-04-28 02:00:20
|
>>>>> "Rich" == Rich Drewes <dr...@in...> writes:
Rich> I should add that we were both ssh'd into a Linux machine,
Rich> he from Windows and I from Linux. So his DISPLAY was not
Rich> set and mine was. When he ran the script it failed for him,
Rich> but worked for me, even though the script only did a savefig
Rich> and never tried to actually show() anything to a screen. Is
Rich> that expected behavior?
If you don't use the matplotlib.use directive, matplotlib will try and
load its default backend from the rc file
(http://matplotlib.sf.net/.matplotlibrc); if you haven't customized
this on linux it is GTKAgg. My guess is that this is what is causing
your problem. You have two choices in addition to the use directive:
1) change the default backend to a non-GUI backend in the rc file,
eg "backend : PS". Copy the rc file to your HOME directory (or
working directory) and edit it.
2) use a command line arg to force the backend
> python myscript.py -dPS
Hope this helps,
JDH
|
|
From: Rich D. <dr...@in...> - 2005-04-28 01:29:00
|
I should add that we were both ssh'd into a Linux machine, he from Windows
and I from Linux. So his DISPLAY was not set and mine was. When he ran
the script it failed for him, but worked for me, even though the script
only did a savefig and never tried to actually show() anything to a
screen. Is that expected behavior?
Rich
On Wed, 27 Apr 2005, Rich Drewes wrote:
> Hello,
>
> I gave a colleague a matplotlib script that generated a .ps output with
> savefig, and was surprised when it didn't work for him. I eventually
> figured out that since he was a Windows user and didn't have DISPLAY set,
> the import of the matplotlib libraries was failing with the error in this
> message's subject. I eventually solved the problem by doing
> "matplotlib.use('PS')" before the pylab import.
>
> However, the script never tried to actually display anything, it only
> created the plot and did a savefig at the end. So my question is: is
> this "could not open display" behavior at import the way things are
> supposed to work, or is this a bug? It seems like it would be better to
> hold off on the "could not open display" error until someone actually
> tried to display something, and if all they did was savefigs, everything
> would work fine.
>
> This is on matplotlib .80.
>
> Thanks,
> Rich
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Steve C. <ste...@ya...> - 2005-04-28 00:56:15
|
> On Wed, 2005-04-27 at 11:46 -0700, matplotlib-users-
> re...@li... wrote:
> > Please note that my original posting was to matplotlib-users-admin by
> > mistake, so not everyone saw the first part of this (below).
> >
> > Based on John's suggestions, I checked figsize and dpi settings and
> > still find a difference in the plot quality between using pylab.figure
> > and using matplotlib.figure.Figure.
> >
> > As a simple test, I modified the example pythonic_matplotlib.py to plot
> > in a gtk window and use Figure as follows:
> >
> > ----------
> > from pylab import figure, close, axes, subplot, show
> > from matplotlib.numerix import arange, sin, pi
> >
> > import pygtk
> > pygtk.require("2.0")
> > import os, gtk
> > import matplotlib
> > matplotlib.use('GTKAgg')
> >
> > from matplotlib.backends.backend_gtkagg import FigureCanvasGTK as
> > FigureCanvas
> > from matplotlib.figure import Figure
> >
> > t = arange(0.0, 1.0, 0.01)
> >
> > #fig = figure(1)
> > fig = Figure(dpi=100)
> >
> > ax1 = fig.add_subplot(211)
> > ax1.plot(t, sin(2*pi*t),antialiased=True,linewidth=0.5)
> > ax1.grid(True)
> > ax1.set_ylim( (-2,2) )
> > ax1.set_ylabel('1 Hz')
> > ax1.set_title('A sine wave or two')
> >
> > for label in ax1.get_xticklabels():
> > label.set_color('r')
> >
> >
> > ax2 = fig.add_subplot(212)
> > ax2.plot(t, sin(2*2*pi*t),antialiased=True,linewidth=0.5)
> > ax2.grid(True)
> > ax2.set_ylim( (-2,2) )
> > l = ax2.set_xlabel('Hi mom')
> > l.set_color('g')
> > l.set_fontsize('large')
> >
> > win = gtk.Window()
> > win.set_default_size(800,600)
> > win.set_title("Plotting in a GTK Window")
> > win.connect("destroy", lambda x: gtk.main_quit())
> > vbox = gtk.VBox()
> > canvas = FigureCanvas(fig)
> >
> > vbox.pack_start(canvas)
> > win.add(vbox)
> > win.show_all()
> > gtk.main()
> >
> > #show()
> > -------------
> >
> > With dpi=100 (the value in my .matplotlibrc),
> > win.set_default_size(800,600) makes the size consistent with
> > 'figure.figsize : 8, 6 ' in my .matplotlibrc and the plots are indeed
> > the same size. Note I also explicitly set antialiased=True and
> > linewidth=0.5 in the plot method calls to be consistent with my rc file.
> >
> > Compared to the original example, with embedding the sine waves plot
> > jaggy, the border around the plot is not as bold, and the text is
> > (slightly) bigger. Am I hallucinating or is there something else
> > affecting the plot attributes? Thanks for any feedback.
> >
> > Jeff Orrey
> >
You are selecting the GTK backend and then comparing it to GTKAgg. The
GTK backend does not support anti-aliased lines, whereas GTKAgg does.
"from matplotlib.backends.backend_gtkagg import FigureCanvasGTK as
FigureCanvas"
- should be FigureCanvasGTKAgg
examples/embedding_in_gtk.py shows embedding a matplotlib
FigureCanvasGTK (or GTKAgg) widget to a gtk.Window
Steve
|
|
From: Rich D. <dr...@in...> - 2005-04-28 00:41:43
|
Hello,
I gave a colleague a matplotlib script that generated a .ps output with
savefig, and was surprised when it didn't work for him. I eventually
figured out that since he was a Windows user and didn't have DISPLAY set,
the import of the matplotlib libraries was failing with the error in this
message's subject. I eventually solved the problem by doing
"matplotlib.use('PS')" before the pylab import.
However, the script never tried to actually display anything, it only
created the plot and did a savefig at the end. So my question is: is
this "could not open display" behavior at import the way things are
supposed to work, or is this a bug? It seems like it would be better to
hold off on the "could not open display" error until someone actually
tried to display something, and if all they did was savefigs, everything
would work fine.
This is on matplotlib .80.
Thanks,
Rich
|
|
From: Darren D. <dd...@co...> - 2005-04-28 00:33:16
|
On Wednesday 27 April 2005 9:45 am, John Hunter wrote:
> >>>>> "Darren" == Darren Dale <dd...@co...> writes:
> >> With savefig("Spektren-CuP.ps",orientation="landscape"), the
> >> diagram do not fill the whole a4 page. I think, this is related
> >> to some configuration values, cause the resulting figure is not
> >> an a4 page but a BBox. Any hints where to change that ?
>
> Darren> In your Spektren-CuP.ps, try adding "%%DocumentPaperSizes:
> Darren> A4" after the line that says "%%Orientation: landscape",
> Darren> hopefully that can get you by while I work on a real
> Darren> solution.
>
>
> You will also need to change the default paper size in backend ps
> before using it
>
> import matplotlib.backends.backend_ps as ps
> ps.defaultPaperSize = 8.26771, 11.69291 # A4 width and height in
> inches
>
> import pylab
> ...and now make your plot...
>
>
> Darren and I were discussing making this an rc parameter, so hopefully
> this will be easier in the next release.
>
I committed the changes in cvs. There is now a validated ps.pagesize option
in .matplotlibrc, which defaults to 'letter'.
--
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd...@co...
|