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
(7) |
|
2
(5) |
3
(18) |
4
(9) |
5
(13) |
6
(14) |
7
(8) |
8
(7) |
|
9
(6) |
10
(6) |
11
(24) |
12
(14) |
13
(9) |
14
(21) |
15
(6) |
|
16
(1) |
17
(20) |
18
(42) |
19
(16) |
20
(21) |
21
(41) |
22
(13) |
|
23
(11) |
24
(15) |
25
(32) |
26
(27) |
27
(29) |
28
(10) |
29
(3) |
|
30
(1) |
31
(5) |
|
|
|
|
|
|
From: Michael D. <md...@st...> - 2008-03-18 23:21:59
|
At least the Agg backend *looks* to be reasonably threadsafe -- there are no obvious gotchas like global variables etc. Note, though, that multithreading may not gain much in the way of performance since the global interpreter lock is never released around long-running C blocks. However, I can't speak about this from any experience -- so, maybe it needs some trying. Any patches to help with thread safety and performance are of course welcome ;) Cheers, Mike Chris Withers wrote: > Hi All, > > I'm wondering what work people have done with matplotlib in > multi-threaded environments such as your average python web framework. > > Is matplotlib threadsafe? > > How have people gone about safely using it in a multi-threaded environment? > > cheers, > > Chris > > |
|
From: Rich S. <rsh...@ap...> - 2008-03-18 22:43:24
|
On Tue, 18 Mar 2008, Rich Shepard wrote: > File "termset-test-data.py", line 389, in testCode > pylab.hold() Replacing the line above with pylab.hold(False) seems to put me in a non-stop loop. I'll run the test code in winpdb, but still want suggestions on how to get the output I need. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Rich S. <rsh...@ap...> - 2008-03-18 22:37:02
|
This is my first use of matplotlib so I'd appreciate suggestions for
getting it working properly.
I want to produce many separate plots, each having 1-7 curves plotted on the
same set of axes. Ultimately, I would like the output to be .pdf files so
they can be incorporated into a ReportLab document, but for now I'll settle
for .png files until I understand how to code correctly. The data are
hierarchical to four levels: the lowest levels are the individual curves to
be plotted on common axes for each of the third level values. The extracted
code modules (termset-test-data.py and test-functions.py) are appended. When
run, I see one plot with only a single curve. When I close that window, the
script continues to run producing this error message:
Traceback (most recent call last):
File "termset-test-data.py", line 392, in ?
testCode()
File "termset-test-data.py", line 389, in testCode
pylab.hold()
File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 334, in hold
rc('axes', hold=b)
File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 74, in rc
matplotlib.rc(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/matplotlib/__init__.py", line 712, in rc
rcParams[key] = v
File "/usr/lib/python2.4/site-packages/matplotlib/__init__.py", line 552, in __setitem__
cval = self.validate[key](val)
File "/usr/lib/python2.4/site-packages/matplotlib/rcsetup.py", line 43, in validate_bool
raise ValueError('Could not convert "%s" to boolean' % b)
ValueError: Could not convert "None" to boolean
Suggestions appreciated.
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Eric F. <ef...@ha...> - 2008-03-18 21:18:36
|
Pierre GM wrote: > On Tuesday 18 March 2008 16:17:08 Eric Firing wrote: >> Chris Withers wrote: >>> Eric Firing wrote: >> You should use numpy.masked_where(numpy.isnan(aa), aa). (I meant numpy.ma.masked_where(...)) > > or use masked_invalid directly (shortcut to masked_where((isnan(aa) | > isinf(aa)) I don't see it in numpy.ma, with numpy from svn. In any case, the fastest method is masked_where(~numpy.isfinite(aa), aa): In [1]:import numpy In [2]:xx = numpy.random.rand(10000) In [3]:xx[xx>0.8] = numpy.nan In [6]:timeit numpy.ma.masked_where(~numpy.isfinite(xx), xx) 10000 loops, best of 3: 83.9 µs per loop In [7]:timeit numpy.ma.masked_where(numpy.isnan(xx), xx) 10000 loops, best of 3: 119 µs per loop In [9]:timeit numpy.ma.masked_where((numpy.isnan(xx)|numpy.isinf(xx)), xx) 1000 loops, best of 3: 260 µs per loop So, wherever you do have masked_invalid defined, you might want to use the faster implementation with ~isfinite. Eric > > >>> I only wish that masked_equal didn't blow up when aa contains datetime >>> objects :-( > > Could you send me an example of the kind of data you're using ? > As it seems you're dealing with series indexed in time, you may want to try > scikits.timeseries, a package Matt Knox and myself implemented for that very > reason. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Pierre GM <pgm...@gm...> - 2008-03-18 20:31:46
|
On Tuesday 18 March 2008 16:17:08 Eric Firing wrote: > Chris Withers wrote: > > Eric Firing wrote: > You should use numpy.masked_where(numpy.isnan(aa), aa). or use masked_invalid directly (shortcut to masked_where((isnan(aa) | isinf(aa)) > > I only wish that masked_equal didn't blow up when aa contains datetime > > objects :-( Could you send me an example of the kind of data you're using ? As it seems you're dealing with series indexed in time, you may want to try scikits.timeseries, a package Matt Knox and myself implemented for that very reason. |
|
From: Eric F. <ef...@ha...> - 2008-03-18 20:26:45
|
Chris Withers wrote: > Hi All, > > Is there any way in MPL to do gradient filled bars like you can in > Excel? (click data series -> format data series -> patterns -> fill > effects -> gradient -> diagonal up) > > cheers, > > Chris > Short of laboriously putting an image in each bar, no. Eric |
|
From: Chris W. <ch...@si...> - 2008-03-18 20:22:15
|
Eric Firing wrote:
>> How do I make the small gaps go away?
>
> With svn I don't see any gaps in the example above, either on screen or
> when saved to a png file.
That's cool'n'all, but when is svn going to make it into a Windows
binary release? ;-)
cheers,
Chris - not sure how to compile MPL on Windows :-(
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Eric F. <ef...@ha...> - 2008-03-18 20:21:16
|
Chris Withers wrote: > Hi All, > > Why does the following render small gaps horizontally between the bars? > > import pylab > data = [1,2,1,2,4,2] > labels = pylab.arange(len(data1)) > pylab.bar(labels,data1,width=1,linewidth=0) > pylab.show() > > How do I make the small gaps go away? With svn I don't see any gaps in the example above, either on screen or when saved to a png file. Eric > > cheers, > > Chris > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Chris W. <ch...@si...> - 2008-03-18 20:21:06
|
Hi All,
Is there any way in MPL to do gradient filled bars like you can in
Excel? (click data series -> format data series -> patterns -> fill
effects -> gradient -> diagonal up)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Eric F. <ef...@ha...> - 2008-03-18 20:17:42
|
Chris Withers wrote:
> Eric Firing wrote:
>>> Specifically, what I have is an array like so:
>>>
>>> ['','','',1.1,2.2]
>>
>> Try something like this:
>>
>> import numpy.ma as ma
>> from pylab import *
>>
>> aa = [3.4, 2.5, '','','',1.1,2.2]
>> def to_num(arg):
>> if arg == '':
>> return 9999.0
>> return arg
>>
>> aanum = array([to_num(arg) for arg in aa])
>> aamasked = ma.masked_where(aanum==9999.0, aanum)
>> plot(aamasked)
>> show()
>
> What I ended up doing was getting my array to look like:
>
> from numpy import nan
> aa = [3.4,2.5,nan,nan,nan,1.1,2.2]
> values = numpy.array(aa)
> values = numpy.ma.masked_equal(values,nan)
This is not doing what you think it is, because any logical operation
with a Nan returns False:
In [4]:nan == nan
Out[4]:False
You should use numpy.masked_where(numpy.isnan(aa), aa).
In some places in mpl, nans are treated as missing values, but this is
not uniformly true, so it is better not to count on it.
Your values array is not actually getting masked at the nans:
In [7]:aa = array([1,nan,2])
In [8]:aa
Out[8]:array([ 1., NaN, 2.])
In [9]:values = ma.masked_equal(aa, nan)
In [10]:values
Out[10]:
masked_array(data = [1.0 nan 2.0],
mask = [False False False],
fill_value=1e+20)
Eric
>
> I only wish that masked_equal didn't blow up when aa contains datetime
> objects :-(
>
> cheers,
>
> Chris
>
|
|
From: Chris W. <ch...@si...> - 2008-03-18 20:14:55
|
Hi All, Why does the following render small gaps horizontally between the bars? import pylab data = [1,2,1,2,4,2] labels = pylab.arange(len(data1)) pylab.bar(labels,data1,width=1,linewidth=0) pylab.show() How do I make the small gaps go away? cheers, Chris |
|
From: mdroe <md...@st...> - 2008-03-18 18:11:41
|
It looks like it may be Windows-specific. I can create .eps files with math on mpl-0.91.2, Python 2.5, gs-7.07 on Linux without problems. Someone with a Windows installation may need to look at this. Just so I can have a deeper look -- can you please attach a) the Python source of a minimal plot that causes this problem b) your .eps file output (so I can compare it against mine). Mike Mark Bakker wrote: > Just upgraded to Ghostview 4.9 with Ghostscript 8.61, but it still > doesn't work. > > Does anybody see greek symbols in eps files with mpl 0.92.1? > > Mark > > On Tue, Mar 18, 2008 at 5:07 PM, Mark Bakker <ma...@gm... > <mailto:ma...@gm...>> wrote: > > Hello Bernhard - > > When I set the fonttype to 42, the eps file gets much bigger, and > the fonts seem included. The file contains the same section as yours: > %!PS-TrueTypeFont-1.0-2.0 > %%Title: Bitstream Vera Sans > %%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights > Reserved. > %%Creator: Converted from TrueType to type 42 by PPR > > But still, my eps file doesn't contain the greek letter. > Strangely enough, when I read the epa file, there is a line that says > 0.000000 3.703125 moveto > /chi glyphshow > > Could it be that I have a ghostview problem? It works with the old > mpl, but maybe I need to upgrade? I am using version 4.4. > > BTW, pdf works fine, it is only eps that gives me trouble. > > Mark > > > On Tue, Mar 18, 2008 at 3:47 PM, Bernhard Voigt > <Ber...@de... <mailto:Ber...@de...>> wrote: > > hi again! > > did you look into the eps file, do you see that the font is > included, eg. i have something like that in my eps files > (still in the header section): > %!PS-Adobe-3.0 Resource-Font > %%Title: cmmi10 > %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights > Reserved.012BaKoMa Fonts Collection, Level-B. > %%Creator: Converted from TrueType by PPR > > did you try saving the file as pdf? does this work? check the > file properties (file menu -> properties) and the fonts > included in the file. > > that would at least show that the font is at least included, > or not.... > > good luck! bernhard > > ps: if pdf works, it would be easy to convert to eps... > > > > On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker > <ma...@gm... <mailto:ma...@gm...>> wrote: > > Hello Bernhard and others - > > I tried all the options, but nothing works. > > Whenever I type a greek symbol in mathtext and save the > figure as eps, the greek symbols don't show up. Confirmed > on several windows machines. Python 2.4. mpl 0.91.2. (but > it worked fine under 0.90.1). Does anybody else have this > problem? > > It is starting to look like a bug. Thanks, Mark > > > On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt > <Ber...@de... <mailto:Ber...@de...>> > wrote: > > what are the values of pdf and ps fonttype in your rc > file? > > try using this: > ps.fonttype : 3 # Output Type 3 (Type3) > or Type 42 (TrueType) > pdf.fonttype : 3 # Output Type 3 (Type3) > or Type 42 (TrueType) > > this includes the missing symbols into the ps/pdf > file, if you choose type 42 the complete font will be > inserted in the resulting file. > > in addition check the mathtext.fontset setting, try > using stix or cm: > mathtext.fontset: cm > > best wishes, bernhard > > > > On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker > <ma...@gm... <mailto:ma...@gm...>> wrote: > > Hello - > > I am trying this again. > I recently upgraded to 0.91.2, and export of > mathtext to eps files seems broken (at least with > the default matplotlibrc file). > > Figure looks great on the screen (interactive mode). > Exporting to png still works fine. > > But writing to eps file, the greek symbols (I > tried \theta and \lambda) don't show up at all, > while the latin symbols (a,b,c,etc) look very ugly > (different font than used to). Any suggestions? > Anybody seenig the same behavior? > > Thanks, Mark > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2008-03-18 17:53:12
|
Chris Withers wrote: > Hi All, > > A few of the units demos include the lines: > > from pylab import nx > > ...but this import errors for me. > > Why is that? If you are referring to scripts in the matplotlib/examples/ subdirectory then you must have a version in which some of those scripts had not been brought up to date with the rest of matplotlib. (Historically, this has often been the case--only a subset of the examples are maintained. Right now, for example, simple3d.py is broken. 3D plotting is itself unmaintained, so there is little incentive to do anything about the example.) In the svn version there are no lines importing nx. This was an abbreviation for the numerix module, which was a compatibility wrapper for the three different numeric packages (Numeric, numarray, and numpy) until numpy was fully developed, rendering Numeric and numarray obsolete. Eric > > cheers, > > Chris > |
|
From: Zane S. <za...@id...> - 2008-03-18 16:59:48
|
Chris Withers wrote: > Hi All, > > A few of the units demos include the lines: > > from pylab import nx > > ...but this import errors for me. Not sure if this is relevant, but NX is a frequently used shorthand for the NetworkX graph/network analysis package from Los Alamos National Labs: https://networkx.lanl.gov/reference/networkx/networkx-module.html i.e. people do: import NetworkX as nx It has a sub-package for drawing networks in pylab (networkx.drawing.nx_pylab). Maybe at some point someone was trying to integrate NetworkX with pylab directly and some tests got left laying around? The NetworkX guys would probably know. -- Zane Selvans Amateur Human za...@id... 303/815-6866 PGP Key: 55E0815F |
|
From: Mark B. <ma...@gm...> - 2008-03-18 16:25:50
|
Just upgraded to Ghostview 4.9 with Ghostscript 8.61, but it still doesn't work. Does anybody see greek symbols in eps files with mpl 0.92.1? Mark On Tue, Mar 18, 2008 at 5:07 PM, Mark Bakker <ma...@gm...> wrote: > Hello Bernhard - > > When I set the fonttype to 42, the eps file gets much bigger, and the > fonts seem included. The file contains the same section as yours: > %!PS-TrueTypeFont-1.0-2.0 > %%Title: Bitstream Vera Sans > %%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. > %%Creator: Converted from TrueType to type 42 by PPR > > But still, my eps file doesn't contain the greek letter. > Strangely enough, when I read the epa file, there is a line that says > 0.000000 3.703125 moveto > /chi glyphshow > > Could it be that I have a ghostview problem? It works with the old mpl, > but maybe I need to upgrade? I am using version 4.4. > > BTW, pdf works fine, it is only eps that gives me trouble. > > Mark > > > On Tue, Mar 18, 2008 at 3:47 PM, Bernhard Voigt <Ber...@de...> > wrote: > > > hi again! > > > > did you look into the eps file, do you see that the font is included, > > eg. i have something like that in my eps files (still in the header > > section): > > %!PS-Adobe-3.0 Resource-Font > > %%Title: cmmi10 > > %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights > > Reserved.012BaKoMa Fonts Collection, Level-B. > > %%Creator: Converted from TrueType by PPR > > > > did you try saving the file as pdf? does this work? check the file > > properties (file menu -> properties) and the fonts included in the file. > > > > that would at least show that the font is at least included, or not.... > > > > good luck! bernhard > > > > ps: if pdf works, it would be easy to convert to eps... > > > > > > > > On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker <ma...@gm...> wrote: > > > > > Hello Bernhard and others - > > > > > > I tried all the options, but nothing works. > > > > > > Whenever I type a greek symbol in mathtext and save the figure as eps, > > > the greek symbols don't show up. Confirmed on several windows machines. > > > Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does > > > anybody else have this problem? > > > > > > It is starting to look like a bug. Thanks, Mark > > > > > > > > > On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt < > > > Ber...@de...> wrote: > > > > > > > what are the values of pdf and ps fonttype in your rc file? > > > > > > > > try using this: > > > > ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > > > (TrueType) > > > > pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > > > (TrueType) > > > > > > > > this includes the missing symbols into the ps/pdf file, if you > > > > choose type 42 the complete font will be inserted in the resulting file. > > > > > > > > in addition check the mathtext.fontset setting, try using stix or > > > > cm: > > > > mathtext.fontset: cm > > > > > > > > best wishes, bernhard > > > > > > > > > > > > > > > > On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker <ma...@gm...> > > > > wrote: > > > > > > > > > Hello - > > > > > > > > > > I am trying this again. I recently upgraded to 0.91.2, and export > > > > > of mathtext to eps files seems broken (at least with the default > > > > > matplotlibrc file). > > > > > > > > > > Figure looks great on the screen (interactive mode). Exporting to > > > > > png still works fine. > > > > > > > > > > But writing to eps file, the greek symbols (I tried \theta and > > > > > \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very > > > > > ugly (different font than used to). Any suggestions? Anybody seenig the same > > > > > behavior? > > > > > > > > > > Thanks, Mark > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Matplotlib-users mailing list > > > > > Mat...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > > > > > > > > > > > |
|
From: Chris W. <ch...@si...> - 2008-03-18 16:17:51
|
Matthias Michler wrote:
> - I think this could be a good improvement, but i'm not sure if it is easy to
> expand the functionality of the axes-legend (pyplot.legend or ax.legend) to
> that of a figure-legend(pyplot.figlegend or fig.legend with fig as a figure
> instance) without missing something, because there is no axes specified and
> therefore it is not obvious which lines should be displayed.
True, although if there's only one axes, it's obvious ;-)
(and if there's more than one, it should take an axes as a keyword
parameter)
> In that case the
> default behaviour might become to take all lines from all axes and that's not
> what one always needs, or isn't it?
Who knows, maybe someone would want that? The joy of building generic
tools ;-)
> ax1 = subplot(111)
> # some plotting commands
> labels = []
> for line in ax1.lines:
> label = line.get_label()
> labels.append(label)
> # or in one line:
> # labels = [line.get_label() for line in ax1.lines]
> figlegend(ax1.lines, labels, 'upper right')
Yes, you see, it just feels to me like figlegend should have this code
in it as it's likely to be duplicated every time I need to call figlegend.
Why not just?
figlegend(axes=ax1,'upper right')
>> - it places the legend over the top of the current chart, I want it to
>> the right, so it doesn't obscure the information on the chart...
>
> That's true and I have no idea how to overcome that (except for example
> subplot_adjust(top=0.8)).
Yes, I'm just making do with this for now, but it would be really nice
if MPL supported legends outsite the axes properly.
It would also be good if you didn't have to manually fiddle with
subplot_adjust because you rotated the labels for the x-axis through 90
degrees :-(
>> How does figure.legend interact with subplots?
> I'm don't know, but maybe it doesn't interact with the axes / subplots at all.
'badly' I think is the best summary of the interaction ;-)
> I think in that case the axes-legend is the preferred one, but I have no idea
> how to ensure that nothing is cover by the legend without difficult tuning of
> the parameters or at least ensure that all labels have the same widths.
Yeah :-/ This is where I am... If anyone has any magic code or
suggestions, I'd love to hear 'em ;-)
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Mark B. <ma...@gm...> - 2008-03-18 16:08:02
|
Hello Bernhard - When I set the fonttype to 42, the eps file gets much bigger, and the fonts seem included. The file contains the same section as yours: %!PS-TrueTypeFont-1.0-2.0 %%Title: Bitstream Vera Sans %%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. %%Creator: Converted from TrueType to type 42 by PPR But still, my eps file doesn't contain the greek letter. Strangely enough, when I read the epa file, there is a line that says 0.000000 3.703125 moveto /chi glyphshow Could it be that I have a ghostview problem? It works with the old mpl, but maybe I need to upgrade? I am using version 4.4. BTW, pdf works fine, it is only eps that gives me trouble. Mark On Tue, Mar 18, 2008 at 3:47 PM, Bernhard Voigt <Ber...@de...> wrote: > hi again! > > did you look into the eps file, do you see that the font is included, eg. > i have something like that in my eps files (still in the header section): > %!PS-Adobe-3.0 Resource-Font > %%Title: cmmi10 > %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights > Reserved.012BaKoMa Fonts Collection, Level-B. > %%Creator: Converted from TrueType by PPR > > did you try saving the file as pdf? does this work? check the file > properties (file menu -> properties) and the fonts included in the file. > > that would at least show that the font is at least included, or not.... > > good luck! bernhard > > ps: if pdf works, it would be easy to convert to eps... > > > > On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker <ma...@gm...> wrote: > > > Hello Bernhard and others - > > > > I tried all the options, but nothing works. > > > > Whenever I type a greek symbol in mathtext and save the figure as eps, > > the greek symbols don't show up. Confirmed on several windows machines. > > Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody > > else have this problem? > > > > It is starting to look like a bug. Thanks, Mark > > > > > > On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt <Ber...@de...> > > wrote: > > > > > what are the values of pdf and ps fonttype in your rc file? > > > > > > try using this: > > > ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > > (TrueType) > > > pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > > (TrueType) > > > > > > this includes the missing symbols into the ps/pdf file, if you choose > > > type 42 the complete font will be inserted in the resulting file. > > > > > > in addition check the mathtext.fontset setting, try using stix or cm: > > > mathtext.fontset: cm > > > > > > best wishes, bernhard > > > > > > > > > > > > On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker <ma...@gm...> > > > wrote: > > > > > > > Hello - > > > > > > > > I am trying this again. I recently upgraded to 0.91.2, and export > > > > of mathtext to eps files seems broken (at least with the default > > > > matplotlibrc file). > > > > > > > > Figure looks great on the screen (interactive mode). Exporting to > > > > png still works fine. > > > > > > > > But writing to eps file, the greek symbols (I tried \theta and > > > > \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very > > > > ugly (different font than used to). Any suggestions? Anybody seenig the same > > > > behavior? > > > > > > > > Thanks, Mark > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Matplotlib-users mailing list > > > > Mat...@li... > > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > > > > > |
|
From: Jeff W. <js...@fa...> - 2008-03-18 15:55:18
|
Rich Fought wrote: > >> Rich: You'll have to do it manually with the axes text method. The >> drawparallels method can only label them where they intersect the >> edge of the map. >> > Thanks Jeff, that's what I was afraid of. > > New question: when adding axis labels (xlabel, ylabel) and figure > title, these overlap basemap parallel/meridian labels ... I suppose > I'll have to manually offset these items from the axis as well? Rich: You can pass xlabel and ylabel a position keyword (an x,y tuple). Same for title. See the pylab.text docstring for details. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Chris W. <ch...@si...> - 2008-03-18 15:51:48
|
Hi Matthias,
Matthias Michler wrote:
> in "examples/zorder_demo.py" I found:
> -----------------------------------------------------------------------------------------------
> The default drawing order for axes is patches, lines, text. This
> order is determined by the zorder attribute. The following defaults
> are set
>
> Artist Z-order
> Patch / PatchCollection 1
> Line2D / LineCollection 2
> Text 3
> -------------------------------------------------------------------------------------------------
So I see, but then why if I set the zorder of the grid to 0 or 1, does
it still show up on top of the lines, unless I set the zorder of the
lines to 10 or above?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-18 15:48:19
|
Hi All,
I'm trying to plot a bar chart something like:
from pylab import *
from datetime import datetime,timedelta
now = datetime.now()
data1 = [1,2,3]
data2 = [4,5,6]
labels = [now-timedelta(1),now,now+timedelta(1)]
bar(labels,data1)
show()
However, this blows up:
Traceback (most recent call last):
bar(labels,data1)
File "matplotlib\pyplot.py", line 1402, in bar
ret = gca().bar(*args, **kwargs)
File "matplotlib\axes.py", line 3294, in bar
self.add_patch(r)
File "matplotlib\axes.py", line 1146, in add_patch
self._update_patch_limits(p)
File "matplotlib\axes.py", line 1152, in _update_patch_limits
xys = self._get_verts_in_data_coords(
File "matplotlib\patches.py", line 362, in get_verts
right = self.convert_xunits(x + self.width)
TypeError: unsupported operand type(s) for +: 'datetime.datetime' and
'float'
What am I doing wrong?
Also, how do I go about adding a second set of bars? (ie: from data2)?
(Bear in mind that in the real use, there are over 600 days worth of
data, so I want to take advantage of the normal tick locators, etc as
much as possible...)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Rich F. <wha...@fs...> - 2008-03-18 15:21:58
|
> Rich: You'll have to do it manually with the axes text method. The > drawparallels method can only label them where they intersect the edge > of the map. > Thanks Jeff, that's what I was afraid of. New question: when adding axis labels (xlabel, ylabel) and figure title, these overlap basemap parallel/meridian labels ... I suppose I'll have to manually offset these items from the axis as well? Rich |
|
From: Jeff W. <js...@fa...> - 2008-03-18 15:12:13
|
Rich Fought wrote:
> Hi,
>
> When using north/south polar stereographic projections from basemap, how
> can I get labels to show up on the parallels when none of them intersect
> a plot edge?
>
> Thanks,
> Rich
>
Rich: You'll have to do it manually with the axes text method. The
drawparallels method can only label them where they intersect the edge
of the map.
Something like this perhaps:
x,y = map(lon, lat) # get desired location in map projection coordinates
ax = pylab.gca() # get current axes instance
t = ax.text(x,y,latlab) # see axes.text docstring for **kwargs
where map is the basemap instance, and lat,lon is where you want the
label (latlab) to go.
latlab can be defined like this:
if latval > 0:
latlab = u'%g\N{DEGREE SIGN}N% latval
else
latlab = u'%g\N{DEGREE SIGN}S% latval
HTH,
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Rich F. <wha...@fs...> - 2008-03-18 15:01:41
|
Hi, When using north/south polar stereographic projections from basemap, how can I get labels to show up on the parallels when none of them intersect a plot edge? Thanks, Rich |
|
From: Bernhard V. <Ber...@de...> - 2008-03-18 14:47:18
|
hi again! did you look into the eps file, do you see that the font is included, eg. i have something like that in my eps files (still in the header section): %!PS-Adobe-3.0 Resource-Font %%Title: cmmi10 %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights Reserved.012BaKoMa Fonts Collection, Level-B. %%Creator: Converted from TrueType by PPR did you try saving the file as pdf? does this work? check the file properties (file menu -> properties) and the fonts included in the file. that would at least show that the font is at least included, or not.... good luck! bernhard ps: if pdf works, it would be easy to convert to eps... On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker <ma...@gm...> wrote: > Hello Bernhard and others - > > I tried all the options, but nothing works. > > Whenever I type a greek symbol in mathtext and save the figure as eps, the > greek symbols don't show up. Confirmed on several windows machines. Python > 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody else have > this problem? > > It is starting to look like a bug. Thanks, Mark > > > On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt <Ber...@de...> > wrote: > > > what are the values of pdf and ps fonttype in your rc file? > > > > try using this: > > ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > (TrueType) > > pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 > > (TrueType) > > > > this includes the missing symbols into the ps/pdf file, if you choose > > type 42 the complete font will be inserted in the resulting file. > > > > in addition check the mathtext.fontset setting, try using stix or cm: > > mathtext.fontset: cm > > > > best wishes, bernhard > > > > > > > > On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker <ma...@gm...> wrote: > > > > > Hello - > > > > > > I am trying this again. I recently upgraded to 0.91.2, and export of > > > mathtext to eps files seems broken (at least with the default matplotlibrc > > > file). > > > > > > Figure looks great on the screen (interactive mode). Exporting to png > > > still works fine. > > > > > > But writing to eps file, the greek symbols (I tried \theta and > > > \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very > > > ugly (different font than used to). Any suggestions? Anybody seenig the same > > > behavior? > > > > > > Thanks, Mark > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > |
|
From: Matthias M. <Mat...@gm...> - 2008-03-18 12:29:21
|
Hello Chris, in "examples/zorder_demo.py" I found: ----------------------------------------------------------------------------------------------- The default drawing order for axes is patches, lines, text. This order is determined by the zorder attribute. The following defaults are set Artist Z-order Patch / PatchCollection 1 Line2D / LineCollection 2 Text 3 ------------------------------------------------------------------------------------------------- best regards Matthias On Tuesday 18 March 2008 12:15, Chris Withers wrote: > Chris Withers wrote: > > I tried fiddling with the zorder of the plot and the grid but nothing > > had any effect. What am I doing wrong? How do I get the grid to show up > > behind the lines? > > Actually, I did manage to fix this by specifying a zorder of 10 for the > plots and a zorder of 1 for the grids. > > What's the default zorder? Ideally I'd just like to supply the zorder to > the grids... > > cheers, > > Chris |