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
|
|
From: Jakob G. <ga...@il...> - 2012-09-04 07:37:16
|
On 09/04/2012 09:13 AM, Eric Firing wrote:
> On 2012/09/03 8:33 PM, Jakob Gager wrote:
>> On 09/03/2012 08:57 PM, Eric Firing wrote:
>>> It looks like you can either use the _get_layout() method (which
>>> requires that you specify the renderer), or, if you know the text object
>>> will be among the last 50 for which _get_layout() has been called, you
>>> can use txt1.cached[txt1.get_prop_typ()].
>>>
>>> Eric
>>
>> Many thanks for the quick and valuable return. I now use the _get_layout() method and
>> it works like a charm :)
>>
>> Just replaced:
>> sf1 = 6*72./txt1.cached.items()[0][1][1][0][1][0]
>> with:
>> sf1 = 6*72./txt1._get_layout('GTKAgg')[1][0][1][0]
>
> Jakob,
>
> What is actually happening here is that the first two lines of
> _get_layout() are equivalent to the second method I suggested (that's
> where I got the idea for that method), and the renderer argument is
> never being used. This is good, because the renderer argument would have
> to be a renderer instance, not the string name of a backend.
>
> There is also the caution that the leading underscore means
> _get_layout() is intended for internal mpl use only, and subject to
> change without notice. So, with some future version of mpl, you may need
> to change your code again.
>
> Eric
>
Hi Eric,
does this mean you would suggest to use txt1.cached[txt1.get_prop_tup()] to be on the save side for
future versions? I'm aware of the leading underscore notation, however, the txt.cached dictionary has
changed as well (without leading underscore and notice?), therefore, slight modifications in the scrips
cannot be precluded anyway.
Regarding the renderer argument...
I first thought about passing a renderer instance to the _get_layout method, but as I had no clue where
to get this instance from. So I simply tried with the backend name and luckly it worked :).
Thanks again, and have a nice day!
Jakob
|
|
From: Eric F. <ef...@ha...> - 2012-09-04 07:13:38
|
On 2012/09/03 8:33 PM, Jakob Gager wrote:
> On 09/03/2012 08:57 PM, Eric Firing wrote:
>> It looks like you can either use the _get_layout() method (which
>> requires that you specify the renderer), or, if you know the text object
>> will be among the last 50 for which _get_layout() has been called, you
>> can use txt1.cached[txt1.get_prop_typ()].
>>
>>>
>>> Is there a different way to achieve a fitted text object?
>>
>> Not that I know of; but someone else may have a suggestion.
>>
>> Eric
>
> Many thanks for the quick and valuable return. I now use the _get_layout() method and
> it works like a charm :)
>
> Just replaced:
> sf1 = 6*72./txt1.cached.items()[0][1][1][0][1][0]
> with:
> sf1 = 6*72./txt1._get_layout('GTKAgg')[1][0][1][0]
Jakob,
What is actually happening here is that the first two lines of
_get_layout() are equivalent to the second method I suggested (that's
where I got the idea for that method), and the renderer argument is
never being used. This is good, because the renderer argument would have
to be a renderer instance, not the string name of a backend.
There is also the caution that the leading underscore means
_get_layout() is intended for internal mpl use only, and subject to
change without notice. So, with some future version of mpl, you may need
to change your code again.
Eric
>
> br
> Jakob
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jakob G. <ga...@il...> - 2012-09-04 06:33:32
|
On 09/03/2012 08:57 PM, Eric Firing wrote:
> It looks like you can either use the _get_layout() method (which
> requires that you specify the renderer), or, if you know the text object
> will be among the last 50 for which _get_layout() has been called, you
> can use txt1.cached[txt1.get_prop_typ()].
>
>>
>> Is there a different way to achieve a fitted text object?
>
> Not that I know of; but someone else may have a suggestion.
>
> Eric
Many thanks for the quick and valuable return. I now use the _get_layout() method and
it works like a charm :)
Just replaced:
sf1 = 6*72./txt1.cached.items()[0][1][1][0][1][0]
with:
sf1 = 6*72./txt1._get_layout('GTKAgg')[1][0][1][0]
br
Jakob
|
|
From: Damon M. <dam...@gm...> - 2012-09-03 22:15:32
|
On Mon, Sep 3, 2012 at 10:20 PM, Chao YUE <cha...@gm...> wrote: > Thanks Damon, it's very clear now. > I explicit set the backend as "GTKAgg" in my ipython user configuration > file. and always set the backend to 'Agg' in my rc file. So that when I use > ipython, I can see the window interactively, but when I use script, it also > works :P > That's an awesome idea. Glad it's working now. > Chao > > > On Mon, Sep 3, 2012 at 8:13 PM, Damon McDougall <dam...@gm...> > wrote: >> >> On Mon, Sep 3, 2012 at 6:08 PM, Chao YUE <cha...@gm...> wrote: >> > Yet if I don't want to change the rc file, I guess I must change in the >> > modules where matplotlib has been imported for the first time? >> >> If you're changing the rc file in your home directory: >> >> ~/.matplotlib/matplotlibrc >> >> then just make a copy before you change it: >> >> cd ~/.matplotlib >> cp matplotlibrc matplotlibrc_orig >> >> then edit matplotlibrc. Just rename matplotlibrc_orig back to >> matplotlibrc when you're done. >> >> -- >> Damon McDougall >> http://www.damon.is-a-geek.com >> B2.39 >> Mathematics Institute >> University of Warwick >> Coventry >> West Midlands >> CV4 7AL >> United Kingdom > > > > > -- > *********************************************************************************** > Chao YUE > Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) > UMR 1572 CEA-CNRS-UVSQ > Batiment 712 - Pe 119 > 91191 GIF Sur YVETTE Cedex > Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 > ************************************************************************************ > -- Damon McDougall http://www.damon.is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Chao Y. <cha...@gm...> - 2012-09-03 21:20:30
|
Thanks Damon, it's very clear now. I explicit set the backend as "GTKAgg" in my ipython user configuration file. and always set the backend to 'Agg' in my rc file. So that when I use ipython, I can see the window interactively, but when I use script, it also works :P Chao On Mon, Sep 3, 2012 at 8:13 PM, Damon McDougall <dam...@gm...>wrote: > On Mon, Sep 3, 2012 at 6:08 PM, Chao YUE <cha...@gm...> wrote: > > Yet if I don't want to change the rc file, I guess I must change in the > > modules where matplotlib has been imported for the first time? > > If you're changing the rc file in your home directory: > > ~/.matplotlib/matplotlibrc > > then just make a copy before you change it: > > cd ~/.matplotlib > cp matplotlibrc matplotlibrc_orig > > then edit matplotlibrc. Just rename matplotlibrc_orig back to > matplotlibrc when you're done. > > -- > Damon McDougall > http://www.damon.is-a-geek.com > B2.39 > Mathematics Institute > University of Warwick > Coventry > West Midlands > CV4 7AL > United Kingdom > -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
|
From: Gyro F. <gyr...@gm...> - 2012-09-03 20:30:09
|
Hi, I am trying to create a multi-subplot animation with based loosely on the animation example code, subplots.py, at http://matplotlib.sourceforge.net/examples/animation/subplots.html A simplified version of the full code is shown at this gist: https://gist.github.com/3613113 I am having problems getting the code to function properly. If I run it as is, the figure appears, but no animation is done. Apparently the setup code is called, but the code to change the frames is not. If I comment out the call to the setup code, the method to update the frame is called once, and that is it. I would appreciate any help and insights that you can provide. Thank you very much. -g |
|
From: Eric F. <ef...@ha...> - 2012-09-03 18:57:38
|
On 2012/09/03 1:38 AM, Jakob Gager wrote: > Recently, I switched from matplotlib 0.99 to 1.0.1 and unfortunately discovered > that my text scaling script stopped working properly. The script scales the given text > to fit into the current figure. > > A quick example of what I'm doing (works in 0.99, but not in 1.0.1 and 1.1.1rc): > import matplotlib.pyplot as plt > plt.ion() > fig = plt.figure(1, (6,8), dpi=72) > fig.add_axes([0,0,1,1]) > txt1 = plt.text(0.5,0.5,'foobar',horizontalalignment='center',verticalalignment='center') > plt.draw() > # compute width of figure in points and divide by txt1 bounding box width > sf1 = 6*72./txt1.cached.items()[0][1][1][0][1][0] > txt1.set_size(txt1.get_size()*sf1) > plt.draw() > > The problem is related to the fact that starting from mpl 1.0.1, the txt1.cached dictionary contains > information of all text objects present rather than only of the specific object. > I guess this behavior is intended, however this way it is rather complicated to derive the bounding > box of the specific text object without cycling over the whole dictionary. It looks like you can either use the _get_layout() method (which requires that you specify the renderer), or, if you know the text object will be among the last 50 for which _get_layout() has been called, you can use txt1.cached[txt1.get_prop_typ()]. > > Is there a different way to achieve a fitted text object? Not that I know of; but someone else may have a suggestion. Eric > > Thanks, > br Jakob > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Damon M. <dam...@gm...> - 2012-09-03 18:13:27
|
On Mon, Sep 3, 2012 at 6:08 PM, Chao YUE <cha...@gm...> wrote: > Yet if I don't want to change the rc file, I guess I must change in the > modules where matplotlib has been imported for the first time? If you're changing the rc file in your home directory: ~/.matplotlib/matplotlibrc then just make a copy before you change it: cd ~/.matplotlib cp matplotlibrc matplotlibrc_orig then edit matplotlibrc. Just rename matplotlibrc_orig back to matplotlibrc when you're done. -- Damon McDougall http://www.damon.is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Chao Y. <cha...@gm...> - 2012-09-03 17:08:45
|
Hi Ben,
I changed the backend in matplotlibrc file. It works fine. Yet if I don't
want to change the rc file, I guess I must change in the modules where
matplotlib has been imported for the first time?
cheers,
Chao
On Mon, Sep 3, 2012 at 3:30 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Monday, September 3, 2012, Chao YUE wrote:
>
>> Dear all,
>>
>> I have a module written by myself which use
>> python-netcdf/matplotlib/numpy/basemap for treating and mapping of netcdf
>> files.
>> so in the module I have a line:
>>
>> import matplotlib.pyplot as plt
>>
>> But now I am using some function of this module which do not involve the
>> visualisation. And I want to use it in a batch mode submitted by qsub
>> command.
>> And then I have traceback like following:
>>
>> File "/home/orchidee01/ychao/SCRIPT/combine.py", line 1, in <module>
>> import gnc
>> File "/home/users/ychao/python/python_lib/gnc.py", line 4, in <module>
>> import matplotlib.pyplot as plt
>> File
>> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/pyplot.py",
>> line 95, in <module>
>> new_figure_manager, draw_if_interactive, _show = pylab_setup()
>> File
>> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/__init__.py",
>> line 25, in pylab_setup
>> globals(),locals(),[backend_name])
>> File
>> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py",
>> line 10, in <module>
>> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
>> FigureCanvasGTK,\
>> File
>> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
>> line 8, in <module>
>> import gtk; gdk = gtk.gdk
>> File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
>> 64, in <module>
>> _init()
>> File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
>> 52, in _init
>> _gtk.init_check()
>> RuntimeError: could not open display
>>
>> From the last line, I think this is because I cannot use this module in a
>> non-interactive mode. So is there a way I can bypass this issue and still
>> use the module in a non-interactive mode? Thanks a lot for any
>> information.
>>
>> Chao
>>
>>
> import matplotlib
> matplotlib.use("AGG")
>
> Or set that in the matplotlibrc file.
>
> Cheers,
> Ben Root
>
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
|
|
From: Alan G I. <ai...@am...> - 2012-09-03 14:32:00
|
On 8/29/2012 10:32 PM, Fernando Perez wrote: > http://numfocus.org/johnhunter My thanks to NumFOCUS for setting up this memorial fund so that Matplotlib users can say thank you to John. Alan Isaac |
|
From: Benjamin R. <ben...@ou...> - 2012-09-03 13:30:31
|
On Monday, September 3, 2012, Chao YUE wrote:
> Dear all,
>
> I have a module written by myself which use
> python-netcdf/matplotlib/numpy/basemap for treating and mapping of netcdf
> files.
> so in the module I have a line:
>
> import matplotlib.pyplot as plt
>
> But now I am using some function of this module which do not involve the
> visualisation. And I want to use it in a batch mode submitted by qsub
> command.
> And then I have traceback like following:
>
> File "/home/orchidee01/ychao/SCRIPT/combine.py", line 1, in <module>
> import gnc
> File "/home/users/ychao/python/python_lib/gnc.py", line 4, in <module>
> import matplotlib.pyplot as plt
> File
> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/pyplot.py",
> line 95, in <module>
> new_figure_manager, draw_if_interactive, _show = pylab_setup()
> File
> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py",
> line 10, in <module>
> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
> FigureCanvasGTK,\
> File
> "/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
> line 8, in <module>
> import gtk; gdk = gtk.gdk
> File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
> 64, in <module>
> _init()
> File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
> 52, in _init
> _gtk.init_check()
> RuntimeError: could not open display
>
> From the last line, I think this is because I cannot use this module in a
> non-interactive mode. So is there a way I can bypass this issue and still
> use the module in a non-interactive mode? Thanks a lot for any
> information.
>
> Chao
>
>
import matplotlib
matplotlib.use("AGG")
Or set that in the matplotlibrc file.
Cheers,
Ben Root
|
|
From: Chao Y. <cha...@gm...> - 2012-09-03 12:53:55
|
Dear all,
I have a module written by myself which use
python-netcdf/matplotlib/numpy/basemap for treating and mapping of netcdf
files.
so in the module I have a line:
import matplotlib.pyplot as plt
But now I am using some function of this module which do not involve the
visualisation. And I want to use it in a batch mode submitted by qsub
command.
And then I have traceback like following:
File "/home/orchidee01/ychao/SCRIPT/combine.py", line 1, in <module>
import gnc
File "/home/users/ychao/python/python_lib/gnc.py", line 4, in <module>
import matplotlib.pyplot as plt
File
"/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/pyplot.py",
line 95, in <module>
new_figure_manager, draw_if_interactive, _show = pylab_setup()
File
"/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/__init__.py",
line 25, in pylab_setup
globals(),locals(),[backend_name])
File
"/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py",
line 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
FigureCanvasGTK,\
File
"/usr/local/install/matplotlib-1.1.0/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
line 8, in <module>
import gtk; gdk = gtk.gdk
File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
64, in <module>
_init()
File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
52, in _init
_gtk.init_check()
RuntimeError: could not open display
>From the last line, I think this is because I cannot use this module in a
non-interactive mode. So is there a way I can bypass this issue and still
use the module in a non-interactive mode? Thanks a lot for any information.
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
|
|
From: Jakob G. <ga...@il...> - 2012-09-03 11:56:08
|
Recently, I switched from matplotlib 0.99 to 1.0.1 and unfortunately discovered that my text scaling script stopped working properly. The script scales the given text to fit into the current figure. A quick example of what I'm doing (works in 0.99, but not in 1.0.1 and 1.1.1rc): import matplotlib.pyplot as plt plt.ion() fig = plt.figure(1, (6,8), dpi=72) fig.add_axes([0,0,1,1]) txt1 = plt.text(0.5,0.5,'foobar',horizontalalignment='center',verticalalignment='center') plt.draw() # compute width of figure in points and divide by txt1 bounding box width sf1 = 6*72./txt1.cached.items()[0][1][1][0][1][0] txt1.set_size(txt1.get_size()*sf1) plt.draw() The problem is related to the fact that starting from mpl 1.0.1, the txt1.cached dictionary contains information of all text objects present rather than only of the specific object. I guess this behavior is intended, however this way it is rather complicated to derive the bounding box of the specific text object without cycling over the whole dictionary. Is there a different way to achieve a fitted text object? Thanks, br Jakob |
|
From: gsal <sal...@gm...> - 2012-09-01 12:01:10
|
Say, how to have a frame all around the plots? I just tried: fig = plt.figure(edgecolor='r', linewidth=3.0, frameon=True) but do not seem to have any effect. thanks, gsal -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Frame-all-around-tp38762.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Russell E. O. <ro...@uw...> - 2012-08-31 19:28:38
|
In article <5B7...@ne...>, Felix Patzelt <fe...@ne...> wrote: > The dmg you are referring to appears to install to > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > (The main library, not the one for in our user directory). Most likely, this > directory is not in pythons search path. python.org python installs into /Library/Frameworks/Python.framework and its main site-packages directory is the line listed above. That is where *all* packages get installed by default (e.g. by distutils or pip). I suspect the original poster has a conflict with another version of python or another package management system such as homebrew. You can verify which python is running using "which python" (it should be /usr/local/bin/python, which is a symlink to a binary in /Library/Frameworks/Python.framework, or the actual binary itself, depending on your $PATH. One can test matplotlib using: python -c "import matplotlib as m ; m.test(verbosity=1)" If that works then I suspect ipython is misinstalled. -- Russell |
|
From: Goyo <goy...@gm...> - 2012-08-31 18:29:18
|
2012/8/30 Sterling Smith <sm...@fu...>: > Thank you for taking the time to consider my question. I'm sorry that I didn't pose my question correctly. I should have said: 'Consider the _results_ of the following script:' I originally tried to attach the results I obtained, which showed no change in color for the markers in the legend, while the line connecting the markers in the legend did change color. Actualy your question is correctly posted but I misread it. Calling set_color changes only the line color, not the markers. This is expected and documented behavoir. There are separate methods for the markers: line[0].set_markerfacecolor line[0].set_markeredgecolor See http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D Regards Goyo |
|
From: Mark L. <bre...@ya...> - 2012-08-31 16:46:25
|
On 31/08/2012 16:32, Fabrice Silva wrote: > To avoid (not so) rude answer like Mark's one, please try first to refer > to: > - the documentation of the pyplot's commands you use > http://matplotlib.sourceforge.net/api/pyplot_api.html > It tries (pretty well IMHO) to be comprehensive, at least for 99% of use > cases, > > - you can set, once for all, the properties of most matplotlib objects > in the configuration file. An example is here: > http://matplotlib.sourceforge.net/users/customizing.html#a-sample-matplotlibrc-file > It may be a good starting point to determine the name of the property > you are looking for. > > Regards, > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. -- Cheers. Mark Lawrence. |
|
From: Fabrice S. <si...@lm...> - 2012-08-31 15:32:51
|
To avoid (not so) rude answer like Mark's one, please try first to refer to: - the documentation of the pyplot's commands you use http://matplotlib.sourceforge.net/api/pyplot_api.html It tries (pretty well IMHO) to be comprehensive, at least for 99% of use cases, - you can set, once for all, the properties of most matplotlib objects in the configuration file. An example is here: http://matplotlib.sourceforge.net/users/customizing.html#a-sample-matplotlibrc-file It may be a good starting point to determine the name of the property you are looking for. Regards, |
|
From: Fabien L. <laf...@gm...> - 2012-08-31 14:09:44
|
Actually I had some problems to find the solution on the web. Finally I've used: matplotlib.rcParams['legend.fontsize'] = 25.0 and it works well Fabien 2012/8/31 Mark Lawrence <bre...@ya...> > On 31/08/2012 14:42, Fabien Lafont wrote: > > Hello, > > > > The question is in the title :) > > > > Cheers! > > Fabien > > > > I don't wish to appear rude as this list is associated with the Python > language, but do you ever try a search engine before you ask a question? > > -- > Cheers. > > Mark Lawrence. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Mark L. <bre...@ya...> - 2012-08-31 13:57:49
|
On 31/08/2012 14:42, Fabien Lafont wrote: > Hello, > > The question is in the title :) > > Cheers! > Fabien > I don't wish to appear rude as this list is associated with the Python language, but do you ever try a search engine before you ask a question? -- Cheers. Mark Lawrence. |
|
From: Nelle V. <nel...@gm...> - 2012-08-31 13:46:01
|
Hello Fabien,
There is a font size attribute to ``legend``. Here is the description from
the docstring:
*fontsize*: [ size in points | 'xx-small' | 'x-small' |
'small' | 'medium' | 'large' | 'x-large' | 'xx-large' ]
Set the font size. May be either a size string, relative to
the default font size, or an absolute font size in points. This
argument is only used if prop is not specified.
Cheers,
Nelle
On 31 August 2012 15:42, Fabien Lafont <laf...@gm...> wrote:
> Hello,
>
> The question is in the title :)
>
> Cheers!
> Fabien
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Fabien L. <laf...@gm...> - 2012-08-31 13:42:27
|
Hello, The question is in the title :) Cheers! Fabien |
|
From: Fabien L. <laf...@gm...> - 2012-08-31 08:24:08
|
Hi,
I think I was tired yesterday.
matplotlib.rcParams['xtick.labelsize'] = 20.0 works perfectly also
with xlabel("name", size= 30)
Thanks all,
Fabien
2012/8/30 Mark Lawrence <bre...@ya...>:
> On 30/08/2012 19:00, Fabien Lafont wrote:
>> Actually I just want to do it on that plot not on all my future plot.
>>
>> 2012/8/30 Fabrice Silva <si...@lm...>:
>>> Le jeudi 30 août 2012 à 19:48 +0200, Fabien Lafont a écrit :
>>>> I just create two vectors from a .txt file and I plot them.
>>>> I think I have the latest version of matplotlib. I have at least the
>>>> last version of python(x,y)
>>>>
>>>>
>>>> from pylab import*
>>>>
>>>> import matplotlib
>>>> matplotlib.rcParams['xtick.labelsize'] = 20.0
>>>
>>> In your matplotlib config file
>>> axes.titlesize : 10 # fontsize of the axes title
>>> axes.labelsize : 10 # fontsize of the x any y labels
>>> (see http://matplotlib.sourceforge.net/users/customizing.html )
>>>
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>
>
> I think you're looking for this
> http://matplotlib.sourceforge.net/users/whats_new.html#tick-params
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jonno <jon...@gm...> - 2012-08-31 03:09:46
|
Did you ever find the cause of this?
I found that the get_py2exe_datafiles() method didn't find those fonts but
even when I got the fonts manually I still had the same issue with
matplotlib's Font Manager not being able to find them.
On Thu, Nov 10, 2011 at 11:22 AM, Armando Serrano Lombillo <
ars...@gm...> wrote:
> I'm doing data_files += matplotlib.get_py2exe_datafiles().
>
> By the way, the plot I'm trying to do is in log scale, so it is using
> superscripts (when I was searching the lists for an answer I saw some posts
> mentioning this had caused problems).
>
> Oh, and I'm using options={'py2exe':{'bundle_files':1, 'optimize':1}}.
>
> Python 2.5.4 and matplotlib 1.0.0.
>
>
> On Thu, Nov 10, 2011 at 5:03 PM, Michael Droettboom <md...@st...>wrote:
>
>>
>> Did you include the fonts as described here?
>>
>> http://www.py2exe.org/index.cgi/MatPlotLib
>>
>> Mike
>>
>>
>> On 11/10/2011 08:03 AM, Armando Serrano Lombillo wrote:
>>
>> Hello, I'm having a weird problem with matplotlib not finding fonts when
>> being used from a py2exe packed program. The weird thing is that the
>> program works fine on some computers, gives an annoying warning in others
>> (but otherwise keeps working and plots things ok) or gives an error (and no
>> plot is produced) in others.
>>
>> A strange thing I noticed is that I'm using python 2.5 and one of the
>> warnings is referring to python 2.6, so somehow it must be confusing itself
>> with a python version installed in that computer.
>>
>> Can somebody help?
>>
>> Thanks,
>> Armando.
>>
>> Warning it gives on some computers:
>>
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXGeneral'] not found. Falling back
>> to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmb10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmmi10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmex10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmsy10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmr10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmss10'] not found. Falling back to
>> Bitstream Vera Sans
>>
>> Error it gives in another computer:
>>
>> Traceback (most recent call last):
>> File "gui.pyw", line 489, in parejas_fN
>> File "postproceso.pyo", line 714, in __init__
>> File "matplotlib\backends\backend_wxagg.pyo", line 59, in draw
>> File "matplotlib\backends\backend_agg.pyo", line 394, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\figure.pyo", line 798, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axes.pyo", line 1934, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axis.pyo", line 1017, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axis.pyo", line 234, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\text.pyo", line 524, in draw
>> File "matplotlib\text.pyo", line 298, in _get_layout
>> File "matplotlib\backends\backend_agg.pyo", line 180, in
>> get_text_width_height_descent
>> File "matplotlib\backends\backend_agg.pyo", line 221, in _get_agg_font
>> RuntimeError: Could not open facefile
>> C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
>> Cannot_Open_Resource
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register nowhttp://p.sf.net/sfu/rsa-sfdev2dev1
>>
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Sterling S. <sm...@fu...> - 2012-08-30 20:12:32
|
On Aug 30, 2012, at 12:35PM, Benjamin Root wrote:
>
>
> On Thu, Aug 30, 2012 at 3:26 PM, Goyo <goy...@gm...> wrote:
> 2012/8/28 Sterling Smith <sm...@fu...>:
> > List,
> >
> > Consider the following script:
> >
> > import pylab
> > pylab.plot(pylab.linspace(0,1,100),label='Test',marker='o',ls='')
> > pylab.plot(pylab.linspace(0,1,100),label='Test2',marker='o',ls='-')
> > leg=pylab.legend(loc='best')
> > line=leg.get_lines()
> > line[0].set_color('black')
> > line[1].set_color('black')
> > pylab.draw()
> >
> > I am attaching the results I see with the TkAgg baackend. I am using version 1.1.0.
> >
> > I would expect the markers to change colors also. However, I can't seem to find the markers recorded in the legend object to be able to change them. Is this a bug or a feature (resetting the color could lead to inconsistencies between legend and plot)?
>
>
> I think it's a design issue, there's no connection kept between plot
> lines and the legend. You can change colors in the plot an then call
> legend again instead.
>
> Cheers
>
> Goyo
>
>
> That is correct. The lines that one obtains from the get_lines() method of legend are completely new line objects. It is only upon the creation of those lines (at legend creation) that the lines inherit the plot's line properties.
>
> Now, in the future, it would be nice for artist objects to have shareable "styles", in which case an edit to a style in one place effects all artists with the same style object. But that might be something reserved for version 2+.
>
> Cheers!
> Ben Root
>
Ben, Goyo,
Thank you for taking the time to consider my question. I'm sorry that I didn't pose my question correctly. I should have said: 'Consider the _results_ of the following script:' I originally tried to attach the results I obtained, which showed no change in color for the markers in the legend, while the line connecting the markers in the legend did change color.
I understand that the lines in the legend are new objects; this is desirable in my case because I have the same symbol with different colors, where the color means one thing (plasma condition), but the symbol means something else (simulated vs measured). So it makes sense for the markers in the legend describing the meaning of the symbols to be black, as opposed to any of the colors of the markers. However, setting the legend's new line2d object color properties does not change the appearance of the marker in the legend, only the appearance of the line. I suspect that this is because the legend marker is drawn separately from the legend line to accommodate the numpoints argument of the legend functions. Then the question is how to access these markers if they are separate from the line2d objects in the legend. I didn't even see them in the children of the legend [legend.get_children()].
Thank you for your attention,
Sterling
|