SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(38)
2
(31)
3
(9)
4
(13)
5
(24)
6
(11)
7
(8)
8
(14)
9
(7)
10
(4)
11
(7)
12
(11)
13
(16)
14
(19)
15
(11)
16
(9)
17
(3)
18
(4)
19
(47)
20
(28)
21
(9)
22
(9)
23
(11)
24
25
26
(12)
27
(22)
28
(20)
29
(16)
30
(19)

Showing results of 35

1 2 > >> (Page 1 of 2)
From: Andrew K. <ndr...@gm...> - 2010年04月01日 23:22:08
Eric,
I am running it on a windows 7 machine and a windows XP machine. Odd that
it does this only on win32.
-Andy
On Thu, Apr 1, 2010 at 4:17 PM, Eric Firing <ef...@ha...> wrote:
> Andrew Kelly wrote:
>
>> Has anyone had any success in speeding up the mpl imports?
>>
>> "import matplotlib.pyplot as plt" ( or "from matplotlib.figure import
>> Figure")
>>
>> takes 6 full seconds to load. That seems excessive. Any ideas?
>>
>> -Andy
>>
>
> Andy,
>
> A couple replies came back directly to me (probably intended for the list,
> though), and both reported results similar to yours, on Windows machines
> only. What OS and version are you running?
>
> Eric
>
From: Eric F. <ef...@ha...> - 2010年04月01日 23:17:12
Andrew Kelly wrote:
> Has anyone had any success in speeding up the mpl imports?
> 
> "import matplotlib.pyplot as plt" 
> ( or "from matplotlib.figure import Figure")
> 
> takes 6 full seconds to load. That seems excessive. Any ideas?
> 
> -Andy
Andy,
A couple replies came back directly to me (probably intended for the 
list, though), and both reported results similar to yours, on Windows 
machines only. What OS and version are you running?
Eric
From: Thomas R. <tho...@gm...> - 2010年04月01日 23:09:42
Hello,
I upgraded to the latest svn version of matplotlib today, and found that eps files produced with the system latex now seem to be invalid. For example, if I run the following script
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
mpl.rc('text', usetex=False)
fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
fig.savefig('test_notex.eps')
mpl.rc('text', usetex=True)
fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
fig.savefig('test_tex.eps')
and try running pstopdf on them (on MacOS 10.6) I get the following
air:air tom$ pstopdf test_tex.eps 
%%[ Warning: Empty job. No PDF file produced. ] %%
air:air tom$ pstopdf test_notex.eps 
air:air tom$ 
So the file with the system LaTeX enabled no longer works. ps2pdf still works, but the error with pstopdf is important, because for example Preview.app on mac relies on pstopdf, not ps2pdf.
I tried this on two different computers under MacOS 10.6, and tried with ghostscript 8.70 and 8.71 installed, and the problem occurs either way.
Does anyone know what might be causing this? I submitted a bug report a little while back about this
https://sourceforge.net/tracker/?func=detail&aid=2974953&group_id=80706&atid=560720
Thanks in advance for any help,
Thomas
From: Chloe L. <ch...@be...> - 2010年04月01日 22:30:15
The example works for me; Python 2.6.4 (recent Enthought install).
Can you use your new colormap without registering it?
&C
On Apr 1, 2010, at 1 Apr, 2:14 PM, Bruce Ford wrote:
> I'm running into walls trying to create a custom cmap.
>
> Running the example custom_cmap.py unchanged, I get :
>
> AttributeError: 'module' object has no attribute 'register_cmap'
> args = ("'module' object has no attribute 'register_cmap'",)
>
> I've included custom_cmap.py below. It's a major shortcoming that
> there is not a suitable anomaly cmap (with white about the middle).
> Please consider this for an addition.
>
> Anyway, what am I missing with this error? Thanks so much!
>
> Bruce
> ---------------------------------------
> Bruce W. Ford
> Clear Science, Inc.
> br...@cl...
> http://www.ClearScienceInc.com
> Phone/Fax: 904-379-9704
> 8241 Parkridge Circle N.
> Jacksonville, FL 32211
> Skype: bruce.w.ford
> Google Talk: fo...@gm...
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Chloe Lewis
Graduate student, Amundson Lab
Ecosystem Sciences
137 Mulford Hall
Berkeley, CA 94720-3114
http://nature.berkeley.edu/~chlewis
From: Eric F. <ef...@ha...> - 2010年04月01日 22:26:00
Andrew Kelly wrote:
> Has anyone had any success in speeding up the mpl imports?
> 
> "import matplotlib.pyplot as plt" 
> ( or "from matplotlib.figure import Figure")
> 
> takes 6 full seconds to load. That seems excessive. Any ideas?
Unless you have a very old machine, it sounds like something is wrong.
On my laptop it is about 0.6 seconds. About 20% of that is for numpy.
Are mpl and numpy installed locally on your machine, as opposed to being 
accessed over a samba or nfs mount?
Eric
> 
> -Andy
> 
From: Friedrich R. <fri...@gm...> - 2010年04月01日 21:44:25
Hmm, I wrote one time a lazy-import module, you create objects and use
their attributes, but the object imports the module not earlier than
the first attribute access. Thus these objects are used like the
module via "import module". I.e., module = Lazy('matplotlib.module').
 There are also wrappers for classes for replacement of "from moudule
import Class" syntax. Is anybody interested, anyway?
Friedrich
From: Friedrich R. <fri...@gm...> - 2010年04月01日 21:41:19
You forgot about the attachment?
Friedrich
From: Andrew K. <ndr...@gm...> - 2010年04月01日 21:17:50
Has anyone had any success in speeding up the mpl imports?
"import matplotlib.pyplot as plt"
( or "from matplotlib.figure import Figure")
takes 6 full seconds to load. That seems excessive. Any ideas?
-Andy
From: Bruce F. <br...@cl...> - 2010年04月01日 21:14:43
I'm running into walls trying to create a custom cmap.
Running the example custom_cmap.py unchanged, I get :
AttributeError: 'module' object has no attribute 'register_cmap'
 args = ("'module' object has no attribute 'register_cmap'",)
I've included custom_cmap.py below. It's a major shortcoming that
there is not a suitable anomaly cmap (with white about the middle).
Please consider this for an addition.
Anyway, what am I missing with this error? Thanks so much!
Bruce
---------------------------------------
Bruce W. Ford
Clear Science, Inc.
br...@cl...
http://www.ClearScienceInc.com
Phone/Fax: 904-379-9704
8241 Parkridge Circle N.
Jacksonville, FL 32211
Skype: bruce.w.ford
Google Talk: fo...@gm...
From: Friedrich R. <fri...@gm...> - 2010年04月01日 20:51:48
2010年4月1日 ericyosho <eri...@gm...>:
> And we know that for points with coordination, scatter must be the
> simplest way to visualize them.
> Is there any trick to convert a scatter graph into a surface picture directly?
I'm afraid not, because one needs an algorithm to infer the connectivity :-(
Friedrich
From: Mathew Y. <mat...@gm...> - 2010年04月01日 20:43:51
Thanks a bunch JJ. I've been trying to figure that one out all day!
Mathew
On Thu, Apr 1, 2010 at 1:04 PM, Jae-Joon Lee <lee...@gm...> wrote:
> If you're not afraid of contaminating your code with axes_grid toolkit,
>
> instead
>
> cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
>
> try
>
> from mpl_toolkits.axes_grid import make_axes_locatable
> import matplotlib.axes as maxes
>
> divider = make_axes_locatable(ax)
> cax = divider.new_horizontal("5%", pad=0.05, axes_class=maxes.Axes)
> fig.add_axes(cax)
>
> This way, the height of the colorbar always matches that of your main axes.
>
> Regards,
>
> -JJ
>
>
> On Thu, Apr 1, 2010 at 3:24 PM, Mathew Yeates <mat...@gm...>
> wrote:
> > Hi
> >
> > I have a Basemap and I want to manually add a colorbar to the side. As
> you
> > can see in the attached image, the colorbar is not correctly positioned.
> >
> > Here is a snippet of code
> >
> > ax=fig.add_axes([0.1,0.1,0.8,.8])
> > m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)
> >
> > cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
> > cmap = mpl.cm.cool
> > norm = mpl.colors.Normalize(vmin=5, vmax=10)
> > cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
> > norm=norm,
> > orientation='vertical')
> >
> > what am I doing wrong?
> >
> > Mathew
> >
> >
> ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
From: Friedrich R. <fri...@gm...> - 2010年04月01日 20:38:04
The list config got me, so to the list too ...
2010年3月31日 Matthias Michler <Mat...@gm...>:
> On Wednesday 31 March 2010 09:24:10 yogesh karpate wrote:
>> Dear All,
>> I am using one image of 235X130 and plotting the curve on
>> it, now when i save it it goes in the resoltuion of 800X600,
>> I want to keep the resolution intact.What can be done for that to keep the
>> resolution same?
> You can adjust the resolution by changing the figure size and the dpi in
> savefig.
I think, but am not shure, that a problem could be that text is scaled
according to dpi, such that ugly things result with e.g. dpi = 2 or
so. You can also use, when you have an 2-element iterable *shape*
created, holding the pixel extent:
dpi = fig.dpi
fig.set_size_inches(shape[0] / dpi, shape[1] / dpi)
The standard dpi is sensible, otherwise it's for sure possible to
override beforehand.
Then your save command should give the desired result. I have no time
to check, sorry, may you do that :-) Thanks.
Friedrich
From: Jae-Joon L. <lee...@gm...> - 2010年04月01日 20:04:52
If you're not afraid of contaminating your code with axes_grid toolkit,
instead
cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
try
from mpl_toolkits.axes_grid import make_axes_locatable
import matplotlib.axes as maxes
divider = make_axes_locatable(ax)
cax = divider.new_horizontal("5%", pad=0.05, axes_class=maxes.Axes)
fig.add_axes(cax)
This way, the height of the colorbar always matches that of your main axes.
Regards,
-JJ
On Thu, Apr 1, 2010 at 3:24 PM, Mathew Yeates <mat...@gm...> wrote:
> Hi
>
> I have a Basemap and I want to manually add a colorbar to the side. As you
> can see in the attached image, the colorbar is not correctly positioned.
>
> Here is a snippet of code
>
> ax=fig.add_axes([0.1,0.1,0.8,.8])
> m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)
>
> cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
> cmap = mpl.cm.cool
> norm = mpl.colors.Normalize(vmin=5, vmax=10)
> cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
>                    norm=norm,
>                    orientation='vertical')
>
> what am I doing wrong?
>
> Mathew
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Mathew Y. <mat...@gm...> - 2010年04月01日 20:00:36
This doesn't work for what I'm doing. Unless I call "contour" or something
similar, this will fail. I am only using m.plot and this doesn't set things
up properly to call "colorbar".
On Thu, Apr 1, 2010 at 12:40 PM, Jeff Whitaker <js...@fa...> wrote:
> On 4/1/10 1:24 PM, Mathew Yeates wrote:
>
>> Hi
>>
>> I have a Basemap and I want to manually add a colorbar to the side. As you
>> can see in the attached image, the colorbar is not correctly positioned.
>>
>> Here is a snippet of code
>>
>> ax=fig.add_axes([0.1,0.1,0.8,.8])
>> m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)
>>
>> cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
>> cmap = mpl.cm.cool
>> norm = mpl.colors.Normalize(vmin=5, vmax=10)
>> cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
>> norm=norm,
>> orientation='vertical')
>>
>> what am I doing wrong?
>>
>> Mathew
>>
> Nothing. You just have to tweak the cax parameters to get it positioned
> where you want it.
>
> A quick and dirty approach would be to let matplotlib position the colorbar
> by using
>
> import matplotlib.pyplot as plt
>
> <plot stuff on basemap>
>
> plt.colorbar(orientation='vertical',shrink=0.5) # play with the shrink
> param to get it to be the same size as the map
>
> -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-113
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>
>
From: Jeff W. <js...@fa...> - 2010年04月01日 19:40:19
On 4/1/10 1:24 PM, Mathew Yeates wrote:
> Hi
>
> I have a Basemap and I want to manually add a colorbar to the side. As 
> you can see in the attached image, the colorbar is not correctly 
> positioned.
>
> Here is a snippet of code
>
> ax=fig.add_axes([0.1,0.1,0.8,.8])
> m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)
>
> cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
> cmap = mpl.cm.cool
> norm = mpl.colors.Normalize(vmin=5, vmax=10)
> cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
> norm=norm,
> orientation='vertical')
>
> what am I doing wrong?
>
> Mathew
Nothing. You just have to tweak the cax parameters to get it positioned 
where you want it.
A quick and dirty approach would be to let matplotlib position the 
colorbar by using
import matplotlib.pyplot as plt
<plot stuff on basemap>
plt.colorbar(orientation='vertical',shrink=0.5) # play with the shrink 
param to get it to be the same size as the map
-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-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Alex S <sch...@gm...> - 2010年04月01日 18:42:10
Hi, sorry I wasn't too clear... I changed that, but I don't seem to be able
to choose between the different serif fonts, it just always gives me the
default...
Alex S wrote:
> 
> Hi there,
> I'm trying to change the font default on my graph to New Century
> Schoolbook. I'm trying to do this by editing the matplotlibrc file. 
> Unfortunately, although I'm able to change the font.family, I can't figure
> out how to make it use something other than the default in the family... 
> I tried changing the list further down to only include the font I want,
> like this:
> 
> font.serif : New Century Schoolbook #Bitstream Vera Serif, New
> Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,
> Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
> 
> (note I commented out the other fonts, just rearranging the list to put
> New Century Schoolbook first didn't seem to work either)
> 
> Could anyone tell me what I'm doing wrong?
> Thanks a lot!
> Alex
> 
> 
-- 
View this message in context: http://old.nabble.com/Changing-the-font-tp28111472p28112278.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eric F. <ef...@ha...> - 2010年04月01日 18:23:10
Fiocco Davide wrote:
> Dear all,
> 
> I'm trying to plot a 2D vector field. It's a function of time so I would like to display an animation.
> For single frames I used quiver and I'm happy with it... is there any way to update a quiver with time?
> 
If the vectors will always be at the same locations, then you can use 
the set_UVC method to update the vector data; this should make it 
possible to use one of the animation techniques for which examples are 
given in the examples/animation subdirectory of the mpl source 
distribution. (The examples subdirectory of the source is generally a 
better source of up-to-date examples than the cookbook.) I haven't 
tried it, though, and I don't know of any example specific to quiver.
Depending on your use case, you may find it more desirable to save a set 
of single frames and then display them as a movie or animated gif. A 
movie-making example is included in examples/animation.
Eric
> I tried something close to what I found on http://www.scipy.org/Cookbook/Matplotlib/Animations but that didn't work.
> 
> Thanks a lot, 
> 
> Davide
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Alan G I. <ala...@gm...> - 2010年04月01日 18:12:19
On 4/1/2010 1:26 PM, Josh Hemann wrote:
> What I would like to do is overlay some
> http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR sparklines
> so in one visualization I can see
> - The correlation between two variables
> - The marginal densities of the variables
> - A quick idea of what the variables did in time
> 
http://agile.unisonis.com/proj/sparkplot/sparkplot.py
fwiw,
Alan Isaac
From: Fiocco D. <dav...@ep...> - 2010年04月01日 18:09:40
Dear all,
I'm trying to plot a 2D vector field. It's a function of time so I would like to display an animation.
For single frames I used quiver and I'm happy with it... is there any way to update a quiver with time?
I tried something close to what I found on http://www.scipy.org/Cookbook/Matplotlib/Animations but that didn't work.
Thanks a lot, 
Davide
From: Mauro C. <mau...@gm...> - 2010年04月01日 17:45:27
Dear ALL,
I finally solved the problems with displying graphics in Matplotib
with Python 2.6 under Ubuntu Jaunty.
It just turned out that, when upgrading from Intrepid to Jaunty,
several required development packages were removed from the system. I
just discovered that when trying to build and install the latest
version of MPL from source. When I installed them, I could build,
install and run the latest version (0.99.1.2) and it is working well!
I had a similar problem with the wxPython 2.8 GUI library (all my GUI
applications which worked well under Python 2.5 broke after the
upgrade to Python 2.6), however in this case the wxPython developers
mantain their own software repository, so that it was just a question
of updating the software sources.
Despite a few ours of pain/panic, I'm rather satisfied with Ubuntu
Jaunty (and surely Karmic and Lynx are even better), which runs faster
and easily than Intrepid and has less bugs than Hardy.
Thanks to Sandro Tosi, Darren Dale, and Scott Sinclair for their suggestions.
With warmest regards,
-- 
Dr. Mauro J. Cavalcanti
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://sites.google.com/site/maurobio
Linux Registered User #473524 * Ubuntu User #22717
From: Jeff K. <kl...@wi...> - 2010年04月01日 17:45:20
On Thu, Apr 1, 2010 at 11:21 AM, Alex S <sch...@gm...> wrote:
>
> Hi there,
> I'm trying to change the font default on my graph to New Century Schoolbook.
> I'm trying to do this by editing the matplotlibrc file. Unfortunately,
> although I'm able to change the font.family, I can't figure out how to make
> it use something other than the default in the family... I tried changing
> the list further down to only include the font I want, like this:
>
> font.serif     : New Century Schoolbook #Bitstream Vera Serif, New
> Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,
> Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
>
> (note I commented out the other fonts, just rearranging the list to put New
> Century Schoolbook first didn't seem to work either)
>
> Could anyone tell me what I'm doing wrong?
The default font family is sans-serif, so you also need to add:
font.family : serif
I think that should solve the problem.
Cheers,
Jeff
From: Alex S <sch...@gm...> - 2010年04月01日 17:27:59
Hi there,
I'm trying to change the font default on my graph to New Century Schoolbook. 
I'm trying to do this by editing the matplotlibrc file. Unfortunately,
although I'm able to change the font.family, I can't figure out how to make
it use something other than the default in the family... I tried changing
the list further down to only include the font I want, like this:
font.serif : New Century Schoolbook #Bitstream Vera Serif, New
Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,
Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
(note I commented out the other fonts, just rearranging the list to put New
Century Schoolbook first didn't seem to work either)
Could anyone tell me what I'm doing wrong?
Thanks a lot!
Alex
-- 
View this message in context: http://old.nabble.com/Changing-the-font-tp28111472p28111472.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Josh H. <jh...@vn...> - 2010年04月01日 17:27:03
Hi All, 
I used the 
http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_hist.html
scatter_hist example from the Gallery to create the following
visualization:
http://old.nabble.com/file/p28111498/Full5%252B8%252B2_vs_Bulk1%252B2.png 
What I would like to do is overlay some 
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR sparklines 
so in one visualization I can see
 - The correlation between two variables
 - The marginal densities of the variables
 - A quick idea of what the variables did in time
I found some Python code for generating sparklines at M
http://www.perrygeo.net/wordpress/?p=64 atthew Perry's blog . The code works
great for my purposes, and the sparklines are dumped out as PNG files, like
this one
http://old.nabble.com/file/p28111498/spark_x.png 
But, all of the examples and forum discussions I can find pertain to using
an image as the background for a set of axes, and then plotting or
contouring over the image. I simply want to overlay a PNG on an existing set
of multiple axes. I know I can use something like Adobe Illustrator to do
this outside of matplotlib, but is there a way to do this programmatically?
Thanks!
-----
Josh Hemann
Statistical Advisor 
http://www.vni.com/ Visual Numerics 
jhemann at vni dizzot com 
-- 
View this message in context: http://old.nabble.com/How-to-overlay-an-image-on-a-multi-plot--tp28111498p28111498.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Scott S. <sco...@gm...> - 2010年04月01日 13:58:09
>On 1 April 2010 13:53, Mauro Cavalcanti <mau...@gm...> wrote:
> Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
> [GCC 4.3.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from pylab import randn, hist
>>>> x = randn(10000)
>>>> hist(x, 100)
>
> Instead of a nice histogram, I am just presented with a "dump" of the
> contents of an array:
>
> (array([ 2,  0,  1,  2,  1,  2,  1,  3,  4,  7, 15, 16,  9,
>   (cut here to save space)
>    3.97823055, 4.05708515, 4.13593975, 4.21479434, 4.29364894,
>    4.37250354]), <a list of 100 Patch objects>)
>
> No error messages or complaints about a missing graphics backend is
> issued, so I'm lost.
Are you even expecting the correct behaviour? I'm under the impression
that it's necessary to import and call show() if you want to see the
plot? I thought it was necessary to use IPython in pylab mode to get
the behaviour you're after i.e calling hist also brings up the plot
window.
I guess I'm hijacking your thread to ask whether the example on the
front page is misleading, or if my understanding is flawed?
Cheers,
Scott
From: Sandro T. <mo...@de...> - 2010年04月01日 12:50:45
> I will check the matplotlibrc, but why should the Agg default backend not work?
Because 'Agg' is a "file-based" backend, that you use when you want to
generate a file as output (a PNG, f.e.), so savefig() works while
show() not.
You are looking for a GUI backend, something like TkAgg, GTKAgg or
Qt4Agg, that calling show() will generate a window with the graph in
it.
Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
3 messages has been excluded from this view by a project administrator.

Showing results of 35

1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /