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
(16) |
2
(22) |
3
(28) |
4
(17) |
5
(17) |
6
(7) |
|
7
|
8
(15) |
9
(28) |
10
(26) |
11
(28) |
12
(19) |
13
(5) |
|
14
(3) |
15
(21) |
16
(28) |
17
(11) |
18
(18) |
19
(6) |
20
(5) |
|
21
(18) |
22
(11) |
23
(22) |
24
(28) |
25
(17) |
26
(17) |
27
(7) |
|
28
(16) |
29
(24) |
30
(25) |
31
(14) |
|
|
|
|
From: Gökhan S. <gok...@gm...> - 2010-03-16 22:29:02
|
On Tue, Mar 16, 2010 at 4:37 PM, Josh Hemann <jh...@vn...> wrote: > > I have an issue with showing more than 81 tick marks on an X axis and I am > trying to determine a way around it. Background... I am plotting vectors in > which each element represents a different variable and I really do want to > see the labels associated with each element. The vectors may be only 8 > elements long, or as much as 110. When there are more than say 40 elements, > I usually split the plot into two plots contained in a single figure window > (e.g., plotting elements 0:30 in fig.add_subplot(211) and 30:60 in > fig.add_subplot(212)). > > Here are a couple of examples... > > Only 41 variables: > http://old.nabble.com/file/p27924845/Factor_2_TrainingProfiles.png > > > 71 variables: > http://old.nabble.com/file/p27924845/Factor_2_TrainingProfiles.jpeg > > > I have a vector with a 105 elements and before I split things into three > plots I wanted to see what cramming 53 or so variables into a single set of > axes would look like. But, my code that works for these cases does not show > enough tickmarks for the 105 element data. > > Here is an example that you can copy and paste to see for yourself. > > import matplotlib.pyplot as plt > from matplotlib.ticker import MaxNLocator > fig = plt.figure(figsize=[12,7]) > ax = fig.add_subplot(111) > ax.plot(range(110)) > fig.canvas.draw() > ints = range(1,111) > ints = [str(num) for num in ints] > ax.xaxis.set_major_locator(MaxNLocator(110)) > xtickNames = plt.setp(ax, xticklabels=ints) > plt.setp(xtickNames, rotation=90, fontsize=7); > > If you play with the argument to MaxNLocator, you'll see how for smaller > values (like 40) things work as expected (or at least how I have shown the > code has worked for the smaller data sets). > > I have been poking around trying to see what options I have and have not > found anything to get past this limit. Before I start diving into source > code, can anyone suggest > > -Is there a limit? > -Is there an obvious way to accomplish what I need? > > Ultimately, I may split large vectors like this into more than two plots > but > hitting that limit has made me want to investigate why. > > Thanks! > Oh these busy chemical compound plots :) Are those results of gas chromatography analysis? Something like below produces a nice fully plotted output here. Could you give it a try? import matplotlib.pyplot as plt plt.plot(range(100)) locs, labels = plt.xticks(range(100), range(100)) plt.setp(labels, rotation=90, fontsize=7) plt.show() -- Gökhan |
|
From: Josh H. <jh...@vn...> - 2010-03-16 21:37:19
|
I have an issue with showing more than 81 tick marks on an X axis and I am trying to determine a way around it. Background... I am plotting vectors in which each element represents a different variable and I really do want to see the labels associated with each element. The vectors may be only 8 elements long, or as much as 110. When there are more than say 40 elements, I usually split the plot into two plots contained in a single figure window (e.g., plotting elements 0:30 in fig.add_subplot(211) and 30:60 in fig.add_subplot(212)). Here are a couple of examples... Only 41 variables: http://old.nabble.com/file/p27924845/Factor_2_TrainingProfiles.png 71 variables: http://old.nabble.com/file/p27924845/Factor_2_TrainingProfiles.jpeg I have a vector with a 105 elements and before I split things into three plots I wanted to see what cramming 53 or so variables into a single set of axes would look like. But, my code that works for these cases does not show enough tickmarks for the 105 element data. Here is an example that you can copy and paste to see for yourself. import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator fig = plt.figure(figsize=[12,7]) ax = fig.add_subplot(111) ax.plot(range(110)) fig.canvas.draw() ints = range(1,111) ints = [str(num) for num in ints] ax.xaxis.set_major_locator(MaxNLocator(110)) xtickNames = plt.setp(ax, xticklabels=ints) plt.setp(xtickNames, rotation=90, fontsize=7); If you play with the argument to MaxNLocator, you'll see how for smaller values (like 40) things work as expected (or at least how I have shown the code has worked for the smaller data sets). I have been poking around trying to see what options I have and have not found anything to get past this limit. Before I start diving into source code, can anyone suggest -Is there a limit? -Is there an obvious way to accomplish what I need? Ultimately, I may split large vectors like this into more than two plots but hitting that limit has made me want to investigate why. Thanks! ----- Josh Hemann Statistical Advisor http://www.vni.com/ Visual Numerics jh...@vn... | P 720.407.4214 | F 720.407.4199 -- View this message in context: http://old.nabble.com/Is-there-a-maximum-number-of-x-tickmarks--tp27924845p27924845.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Friedrich R. <fri...@gm...> - 2010-03-16 21:11:04
|
For the Windows machine, if you installed with the superpack, you should find an deinstaller in the Python directory called "Removematplotlib.exe", I *guess* it only removes in fact the matplotlib package. You can also safely rename (or delete) the old matplotlib directory and the mpl_toolkits directory in Python-dir\Lib\site-packages\. Ah I see, you mean how to deinstall on Ubuntu? I would recommend to rename the old folders in your site-package directory to, say, matplotlib_ and mpl_toolkits_, and when you are shure later you could be able to safely remove. Does Ubuntu have a package mgr? Hope I could help, Friedrich 2010/3/16 Samuel Teixeira Santos <arc...@gm...>: > Hi all... > On this afternoon I installed on my ubuntu 8.04 server the python-matplotlib > package and his dependencies. > but If I pay attention right that package installed matplotlib 0.91 > on my local desktop wich run windows, I installed the last version... > Anyone knows how do I de-install only matplotlib pack, let only the > dependancies > and install the most recent version? |
|
From: David <ld...@gm...> - 2010-03-16 21:06:16
|
Dear Michael,
thanks for your input. So far, though, no luck.
I have deleted "SimHei" in matplotlibrc, and I can then continue
generating CJK characters. The png is generated, the eps is not. Thus,
no change. The error output is also the same:
RuntimeError: Face has no glyph names
WARNING: Failure executing file: <dea.py>
I have tried
import matplotlib
matplotlib.use('GtkCairo')
as you suggested, but they had no effect whatsoever. Even the error
output is the same.
I attach my code, maybe that gives a hint.
Note: in line 327 and 328 of the matplotlibrc I have added
ps.fonttype=42
pdf.fonttype=42
whereas I have uncommented
pdf.fonttype : 3
Any ideas? I would most welcome any hint and suggestion!
Many thanks,
David
On 17/03/10 04:15, Michael Droettboom wrote:
> The font you are using (SimHei) does not have any glyph names -- these
> are used in the Postscript backend to refer to glyphs outside of the
> ASCII range. More specifically, it looks like it has at least one
> invalid glyph name (glyph names can only contain ASCII characters) --
> loading it in FontForge complains about this. I haven't come across such
> a font before, but maybe that's common in CJK fonts. I don't know. I'm
> looking through the spec to find a way that glyphs can be referenced
> without a name, but I'm not finding one. Note, the PDF backend has the
> same issue.
>
> Do you have the same problem if you remove "SimHei" from the
> font.sans-serif list and thus use "Adobe Song Std" instead? (I was able
> to find an online download of SimHei to test with, but not Adobe Song Std).
>
> As a workaround, the Cairo backend seems to handle this font just fine.
> You can add
>
> import matplotlib
> matplotlib.use('GtkCairo')
>
> to the top of your script.
>
> Mike
>
> David wrote:
>> Hello everybody,
>>
>> I have a final problem with my graph. As a last step I produce an
>> *.eps file that I use in conjunction with LaTeX.
>>
>> Here is the last part of my code:
>>
>> # plt.title('Title')
>> xlab = plt.xlabel(u'输入 1')
>> #xlab.set_position((0.2, 0.1))
>> ylab = plt.ylabel(u'输入 2')
>> plt.grid(True)
>> plt.subplots_adjust(bottom=0.2)
>> plt.show()
>> plt.savefig('dea.eps')
>>
>>
>> plt.show() produces the correct output,
>>
>> but
>>
>> plt.savefig('dea.eps') produces an error (the error message is attached).
>>
>> The error is clearly linked to the Chinese, as it runs through if I
>> take the Chinese out of the code.
>> Also, plt.savefig('dea.png') works fine.
>>
>> Could anyone indicate where I would have to look for the mistake? The
>> matplotlibrc should be fine, but I am not sure.
>>
>> Your help would be greatly appreciated!
>>
>> Many thanks,
>>
>> David
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>>
>> Download Intel® 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: Michael D. <md...@st...> - 2010-03-16 20:15:52
|
The font you are using (SimHei) does not have any glyph names -- these
are used in the Postscript backend to refer to glyphs outside of the
ASCII range. More specifically, it looks like it has at least one
invalid glyph name (glyph names can only contain ASCII characters) --
loading it in FontForge complains about this. I haven't come across such
a font before, but maybe that's common in CJK fonts. I don't know. I'm
looking through the spec to find a way that glyphs can be referenced
without a name, but I'm not finding one. Note, the PDF backend has the
same issue.
Do you have the same problem if you remove "SimHei" from the
font.sans-serif list and thus use "Adobe Song Std" instead? (I was able
to find an online download of SimHei to test with, but not Adobe Song Std).
As a workaround, the Cairo backend seems to handle this font just fine.
You can add
import matplotlib
matplotlib.use('GtkCairo')
to the top of your script.
Mike
David wrote:
> Hello everybody,
>
> I have a final problem with my graph. As a last step I produce an
> *.eps file that I use in conjunction with LaTeX.
>
> Here is the last part of my code:
>
> # plt.title('Title')
> xlab = plt.xlabel(u'输入 1')
> #xlab.set_position((0.2, 0.1))
> ylab = plt.ylabel(u'输入 2')
> plt.grid(True)
> plt.subplots_adjust(bottom=0.2)
> plt.show()
> plt.savefig('dea.eps')
>
>
> plt.show() produces the correct output,
>
> but
>
> plt.savefig('dea.eps') produces an error (the error message is attached).
>
> The error is clearly linked to the Chinese, as it runs through if I
> take the Chinese out of the code.
> Also, plt.savefig('dea.png') works fine.
>
> Could anyone indicate where I would have to look for the mistake? The
> matplotlibrc should be fine, but I am not sure.
>
> Your help would be greatly appreciated!
>
> Many thanks,
>
> David
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Download Intel® 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
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: David <ld...@gm...> - 2010-03-16 19:09:28
|
Hello everybody,
I have a final problem with my graph. As a last step I produce an *.eps
file that I use in conjunction with LaTeX.
Here is the last part of my code:
# plt.title('Title')
xlab = plt.xlabel(u'输入 1')
#xlab.set_position((0.2, 0.1))
ylab = plt.ylabel(u'输入 2')
plt.grid(True)
plt.subplots_adjust(bottom=0.2)
plt.show()
plt.savefig('dea.eps')
plt.show() produces the correct output,
but
plt.savefig('dea.eps') produces an error (the error message is attached).
The error is clearly linked to the Chinese, as it runs through if I take
the Chinese out of the code.
Also, plt.savefig('dea.png') works fine.
Could anyone indicate where I would have to look for the mistake? The
matplotlibrc should be fine, but I am not sure.
Your help would be greatly appreciated!
Many thanks,
David
|
|
From: Alexander D. <ale...@go...> - 2010-03-16 18:36:48
|
Thanks a lot, that seems to work! Alex On Tue, Mar 16, 2010 at 18:54, Ben Axelrod <BAx...@co...> wrote: > There is an uncommented, and therefore undocumented function: > > axes3d.view_init(elev, azim) > > that you can use to rotate the axes. If you have not already, I suggest you use the current SVN version of MPL instead of the 0.99.1 version. Mplot3d has some more features in the trunk, but it is still rough around the edges. > > -Ben > > > > -----Original Message----- > From: Alexander Dietz [mailto:ale...@go...] > Sent: Tuesday, March 16, 2010 1:25 PM > To: Mat...@li... > Subject: [Matplotlib-users] How to 'rotate' a 3D plot? > > Hi, > > I have successfully created a 3D scatter plot with mplot3d, but how can I rotate the plot around e.g. the z-axis? > > I do not want to use the user interface but I would like to use a command to do that. But I could not find good documentation anywhere and the commands attributed to the Axes3D also do not show anything obvious. > > Thanks > Alex > > ------------------------------------------------------------------------------ > Download Intel® 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: Ben A. <BAx...@co...> - 2010-03-16 17:54:27
|
There is an uncommented, and therefore undocumented function: axes3d.view_init(elev, azim) that you can use to rotate the axes. If you have not already, I suggest you use the current SVN version of MPL instead of the 0.99.1 version. Mplot3d has some more features in the trunk, but it is still rough around the edges. -Ben -----Original Message----- From: Alexander Dietz [mailto:ale...@go...] Sent: Tuesday, March 16, 2010 1:25 PM To: Mat...@li... Subject: [Matplotlib-users] How to 'rotate' a 3D plot? Hi, I have successfully created a 3D scatter plot with mplot3d, but how can I rotate the plot around e.g. the z-axis? I do not want to use the user interface but I would like to use a command to do that. But I could not find good documentation anywhere and the commands attributed to the Axes3D also do not show anything obvious. Thanks Alex ------------------------------------------------------------------------------ Download Intel® 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: Christopher B. <Chr...@no...> - 2010-03-16 17:44:11
|
Samuel Teixeira Santos wrote: > I fix it. > > It was a dumb error > > I using '\' on windows > and on ubuntu-linux I must use '/'... note that '\' works in Windows for the most part. Or, better yet, use os.path.join() and friends. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Samuel T. S. <arc...@gm...> - 2010-03-16 17:33:07
|
I fix it. It was a dumb error I using '\' on windows and on ubuntu-linux I must use '/'... sorry... and thanks 2010/3/16 Michael Droettboom <md...@st...> > Can you please post the entire traceback? > > Mike > > Samuel Teixeira Santos wrote: > >> Hi folks >> >> I'm using ubuntu 8.04 lts and matplotlib 0.91 >> >> I cannot upgrade in this moment. >> >> On my app (for web) I fix several errors (because I did her in 0.99) >> >> My last error (I think it is) is on savefig >> >> It tells me that cannot open file >> >> on log error, appears on write_png method. >> >> Is this permission on directory? or a bug? >> >> >> thanks in advanced >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Download Intel® 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 >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
|
From: Alexander D. <ale...@go...> - 2010-03-16 17:25:11
|
Hi, I have successfully created a 3D scatter plot with mplot3d, but how can I rotate the plot around e.g. the z-axis? I do not want to use the user interface but I would like to use a command to do that. But I could not find good documentation anywhere and the commands attributed to the Axes3D also do not show anything obvious. Thanks Alex |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-16 17:21:13
|
On Tue, Mar 16, 2010 at 12:10 PM, PaterMaximus <pat...@go...> wrote: > Another way would be to use a font with a dark edge and light interior (or vice > versa) but I know of know such font for matplotlib. > FYI, the svn version of matplotlib supports this. http://matplotlib.sourceforge.net/trunk-docs/examples/pylab_examples/patheffect_demo.html Regards, -JJ |
|
From: Michael D. <md...@st...> - 2010-03-16 17:10:38
|
Can you please post the entire traceback? Mike Samuel Teixeira Santos wrote: > Hi folks > > I'm using ubuntu 8.04 lts and matplotlib 0.91 > > I cannot upgrade in this moment. > > On my app (for web) I fix several errors (because I did her in 0.99) > > My last error (I think it is) is on savefig > > It tells me that cannot open file > > on log error, appears on write_png method. > > Is this permission on directory? or a bug? > > > thanks in advanced > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® 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 > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Jeff W. <js...@fa...> - 2010-03-16 16:20:30
|
On 3/16/10 10:10 AM, PaterMaximus wrote: > I have I have an image with both light and dark regions. I want to write text on > it in a color that contrasts with the underlying image color. > > Right now if I make the text black, it is not very legible if the underling > color is dark. Similarly, if I make the text white, it is not legible if the > underlying color is light. (using gray text will not work) > > One way to solve the problem would be to: > -produce the image > e.g. im1=plt.imshow (zM,origin='lower',interpolation='hanning',extent=None) > -get the underlying color from the image where I want to place the text > Need help here. How do I get the color from im1 > -calculate a contrasting color > Need help here > -plot the text in the contrasting color > > > > Another way would be to use a font with a dark edge and light interior (or vice > versa) but I know of know such font for matplotlib. > > Any help appreciated... > You could put your text inside a colored box - see e.g. http://matplotlib.sourceforge.net/users/text_intro.html <http://matplotlib.sourceforge.net/users/text_intro.html?highlight=text%20box> -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: David <ld...@gm...> - 2010-03-16 16:18:54
|
On 16/03/10 20:39, Jae-Joon Lee wrote: > > adjust your subplot parameters. > > plt.subplots_adjust(bottom=0.2) Yep, that did the trick! thanks Jae-Joon and Gökhan! David |
|
From: PaterMaximus <pat...@go...> - 2010-03-16 16:10:57
|
I have I have an image with both light and dark regions. I want to write text on it in a color that contrasts with the underlying image color. Right now if I make the text black, it is not very legible if the underling color is dark. Similarly, if I make the text white, it is not legible if the underlying color is light. (using gray text will not work) One way to solve the problem would be to: -produce the image e.g. im1=plt.imshow (zM,origin='lower',interpolation='hanning',extent=None) -get the underlying color from the image where I want to place the text Need help here. How do I get the color from im1 -calculate a contrasting color Need help here -plot the text in the contrasting color Another way would be to use a font with a dark edge and light interior (or vice versa) but I know of know such font for matplotlib. Any help appreciated... |
|
From: Samuel T. S. <arc...@gm...> - 2010-03-16 15:50:32
|
Hi folks I'm using ubuntu 8.04 lts and matplotlib 0.91 I cannot upgrade in this moment. On my app (for web) I fix several errors (because I did her in 0.99) My last error (I think it is) is on savefig It tells me that cannot open file on log error, appears on write_png method. Is this permission on directory? or a bug? thanks in advanced |
|
From: Pierre de B. <pd...@ul...> - 2010-03-16 15:29:49
|
Hello, Unfortunately, the mplot3D page on the SciPy cookbook is not up to date. The 3D code in mplot3d has been moved to a toolkit and needs to be imported as is seen in the examples found here: http://matplotlib.sourceforge.net/examples/mplot3d/index.html > So: Any idea how to create a simple 3D scatter plot,seen from any > arbitrary angle? You can rotate the axis in mplot3d :-) I would say from your error log (the file matplotlib/axes3d.py exists whereas it does not in my mpl 0.99.0) that you did not uninstall the old matplotlib cleanly. I suggest that you clean the existing matplotlib completely and reinstall from the tarball). Pierre Le 16 mars 10 à 00:38, Alexander Dietz a écrit : > Hi, > > I would like to create 3D plots. A search revealed the following page: > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > which explains to install matplotlib version 0.99 to use the 3D code. > Unfortunately, after installingmatplotlib-0.99.1.1 (from > matplotlib-0.99.1.2.tar.gz) I am not able to use the 3D code. The > command that show that the correct version is used together with the > error is shown below. > > Any idea how I can use this code? Do I have to downgrade to the 0.91.x > maintenance branch? Or do you suggest to use mayavi > (http://code.enthought.com/projects/mayavi/docs/development/html/ > mayavi/mlab.html)? > I also tried to install the latter, after 1 hour of installing code > and requirements and cmake and easyinstall.. I got the error that VTK > is not installed. So: Any idea how to create a simple 3D scatter plot, > seen from any arbitrary angle? > > Thanks > Alex > > > > In [1]: import matplotlib > > In [2]: matplotlib.__version__ > Out[2]: '0.99.1.1' > > In [3]: import matplotlib.axes3d as p3 > ---------------------------------------------------------------------- > ----- > NotImplementedError Traceback (most recent > call last) > > /home/alex/Documents/Job/Travel/2010-03_LSC_Pasadena/3D/<ipython > console> in <module>() > > /usr/lib/python2.6/site-packages/matplotlib/axes3d.py in <module>() > ----> 1 raise NotImplementedError('axes3d is not supported in > matplotlib-0.98. You may want to try the 0.91.x maintenance branch') > > NotImplementedError: axes3d is not supported in matplotlib-0.98. You > may want to try the 0.91.x maintenance branch > > ---------------------------------------------------------------------- > -------- > Download Intel® 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: John H. <jd...@gm...> - 2010-03-16 15:01:54
|
On Tue, Mar 16, 2010 at 8:46 AM, Jon Olav Vik <jo...@gm...> wrote: > Thank you, thank you, thank you. > > This is just as convenient, 50% faster even for 1000 series, and runtime does > indeed scale as O(n) up to 10000 series. The projected speedup for 60000 series > was 40x. However, in my actual use case it was at least 400x: Finishing in 2 > min 17 sec rather than not getting past halfway in 16 hours. > > (The extra difference is probably due to better memory usage. Still, > LineCollection requires O(n) memory, whereas manually updating a bitmap would > only use O(1) memory, where 1 = size of bitmap. However, I hope I never have to > do that...) > > May the hours and hours you have saved me be added to your life! 8-) Since you are granting extra life blessings, I thought I should add something to the mix. You should be able to achieve something close to this using the animation blit API. There is a little hackery at the end to use the renderer to directly dump a PNG and thereby circumvent the normal figure.canvas.draw pipeline, but the advantage is you render directly to the canvas and save no intermediaries. See the examples and tutorial at http://matplotlib.sourceforge.net/examples/animation/index.html http://www.scipy.org/Cookbook/Matplotlib/Animations Here's some example code:: import matplotlib._png as _png import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111) n = 10000 line, = ax.plot([],[], alpha=1) x = np.arange(200) fig.canvas.draw() ax.axis([0, 200, -1, 1]) for i in range(n): if (i%100)==0: print i yy = np.sin(x / (2 * np.pi * x[-1] * i)) line.set_data(x, yy) ax.draw_artist(line) fig.canvas.blit(ax.bbox) filename = 'test.png' renderer = fig.canvas.get_renderer() _png.write_png(renderer._renderer.buffer_rgba(0, 0), renderer.width, renderer.height, filename, fig.dpi) JDH |
|
From: Jon O. V. <jo...@gm...> - 2010-03-16 13:47:18
|
Jae-Joon Lee <lee.j.joon@...> writes: > If you're plotting lots of lines, do not use plot but use > LineCollection instead. > > http://matplotlib.sourceforge.net/examples/api/collections_demo.html > > http://matplotlib.sourceforge.net/api/ collections_api.html#matplotlib.collections.LineCollection > > Here is slightly modified version of your code that uses > LineCollection (but I haven't check if the code is correct). > With my not so good macbook, it took me 3 sec for 6000 lines and it > seems like O(n) to me. Thank you, thank you, thank you. This is just as convenient, 50% faster even for 1000 series, and runtime does indeed scale as O(n) up to 10000 series. The projected speedup for 60000 series was 40x. However, in my actual use case it was at least 400x: Finishing in 2 min 17 sec rather than not getting past halfway in 16 hours. (The extra difference is probably due to better memory usage. Still, LineCollection requires O(n) memory, whereas manually updating a bitmap would only use O(1) memory, where 1 = size of bitmap. However, I hope I never have to do that...) May the hours and hours you have saved me be added to your life! 8-) Jon Olav |
|
From: Nick S. <N.S...@du...> - 2010-03-16 13:19:01
|
I have a script that calls several subroutines, each of which makes a different figure. One of these routines makes lots of figures for use in a webpage, all of which are saved as they are made. When I call show() at the end of the script it is showing all the figures (as one might expect), but what I really want is only some of the figures to be brought up in the GUI. Is there a way of specifying which figures show() shows (I can't find anything on the webpage)? -- Cheers, Nick Schurch Data Analysis Group (The Barton Group), School of Life Sciences, University of Dundee, Dow St, Dundee, DD1 5EH, Scotland, UK Tel: +44 1382 388707 Fax: +44 1382 345 893 |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-16 12:40:18
|
On Tue, Mar 16, 2010 at 3:30 AM, David <ld...@gm...> wrote: > This did not yield any results. With the above code, xlab.set_position((0.2, > 0.1)), I change the position of the xlabel. > But the problem is that my graph is cut before the xlabel has a chance to > appear (see dea.png). Basically the graph ends right after the x-axis. What > I thus need is more whitespace under my x-axis. But how? adjust your subplot parameters. plt.subplots_adjust(bottom=0.2) see http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels -JJ |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-16 12:35:30
|
On Tue, Mar 16, 2010 at 3:30 AM, David <ld...@gm...> wrote: > On 16/03/10 07:59, Gökhan Sever wrote: >> >> Probably you need a unicode font-set that contain all the characters for >> those alphabets. You can look at this example to see a simple unicode >> demonstration example. > > Yes, I have done that, for example: > > ylab = plt.ylabel(u'输入 2') if you use tex for rendering text, see http://matplotlib.sourceforge.net/users/usetex.html#usetex-with-unicode If not, the best option I know of is to set the font name directly, see http://old.nabble.com/Russian-labels-without-LaTeX-td24538302.html Matplotlib does not support fontset, so you can only use glyphs in the font you specified. Regards, -JJ |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-16 12:26:13
|
If you're plotting lots of lines, do not use plot but use LineCollection instead. http://matplotlib.sourceforge.net/examples/api/collections_demo.html http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.LineCollection Here is slightly modified version of your code that uses LineCollection (but I haven't check if the code is correct). With my not so good macbook, it took me 3 sec for 6000 lines and it seems like O(n) to me. Regards, -JJ ax = subplot(111) x = np.arange(200) yy = [np.array((x, np.sin(x / (2 * np.pi * x[-1] * i))))) for i in range(n)] yyt = [np.transpose(y1) for y1 in yy] from matplotlib.collections import LineCollection lc = LineCollection(yyt, colors=[(0, 0, 0, alpha)]) ax.add_collection(lc) ax.autoscale_view() On Tue, Mar 16, 2010 at 7:26 AM, Jon Olav Vik <jo...@gm...> wrote: > I want to overlay many line plots using alpha transparency. However, plotting > them in Matplotlib takes about O(n**2) time, and I think I may be running into > memory limitations as well. > > As a simple benchmark, I used IPython to run alco.ipy (below), which runs > alco.py for an increasing number of data series. Extrapolating from this, > plotting 60000 series would take something like 200 minutes. This is similar to > my actual use case, which takes about 3 hours to finish a plot. Zooming in and > saving again is much faster, taking only about 30 seconds. > > I would appreciate suggestions on how to speed this up. For instance: > > Is there a memoryless "canvas" object that I could draw on, just accumulating > the alpha in each pixel: new_alpha = old_alpha + (1 - old_alpha) * this_alpha. > > Failing that, I could do it manually by keeping a Numpy array of the pixels in > the image. For each series, find the x values corresponding to each column > index, then interpolate to find the row index corresponding to each y value. > Finally, use imshow() or something to add axes and annotation. > > That you in advance for any help. > > Best regards, > Jon Olav > > == Output of alco.ipy == > > The columns are "number of series" and "seconds". > > In [8]: run alco.ipy > 1000 9.07 > 2000 24.8 > 3000 44.73 > 4000 67.85 > 5000 95.67 > 6000 135.1 > 7000 177.82 > 8000 226.03 > 9000 278.32 > 10000 340.81 > > == alco.ipy == > > n, t = [], [] > for i in range(1000, 10001, 1000): > n.append(i) > ti = !python alco.py $i > t.append(float(ti.s)) > print n[-1], t[-1] > > plot(n, t, '.-') > > == alco.py == > > """Alpha compositing of line plots. Usage: python alco.py NSERIES ALPHA""" > from sys import argv > import numpy as np > import matplotlib as mpl > mpl.use("agg") # noninteractive plotting > from pylab import * > > n = int(argv[1]) > try: > alpha = float(argv[2]) > except IndexError: > alpha = 0.02 > > # generate some data > x = np.arange(200) > for i in range(n): > y = np.sin(x / (2 * np.pi * x[-1] * i)) > plot(x, y, 'k-', alpha=alpha) > > savefig("test.png") > > > > ------------------------------------------------------------------------------ > Download Intel® 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: Jon O. V. <jo...@gm...> - 2010-03-16 11:35:20
|
I want to overlay many line plots using alpha transparency. However, plotting
them in Matplotlib takes about O(n**2) time, and I think I may be running into
memory limitations as well.
As a simple benchmark, I used IPython to run alco.ipy (below), which runs
alco.py for an increasing number of data series. Extrapolating from this,
plotting 60000 series would take something like 200 minutes. This is similar to
my actual use case, which takes about 3 hours to finish a plot. Zooming in and
saving again is much faster, taking only about 30 seconds.
I would appreciate suggestions on how to speed this up. For instance:
Is there a memoryless "canvas" object that I could draw on, just accumulating
the alpha in each pixel: new_alpha = old_alpha + (1 - old_alpha) * this_alpha.
Failing that, I could do it manually by keeping a Numpy array of the pixels in
the image. For each series, find the x values corresponding to each column
index, then interpolate to find the row index corresponding to each y value.
Finally, use imshow() or something to add axes and annotation.
That you in advance for any help.
Best regards,
Jon Olav
== Output of alco.ipy ==
The columns are "number of series" and "seconds".
In [8]: run alco.ipy
1000 9.07
2000 24.8
3000 44.73
4000 67.85
5000 95.67
6000 135.1
7000 177.82
8000 226.03
9000 278.32
10000 340.81
== alco.ipy ==
n, t = [], []
for i in range(1000, 10001, 1000):
n.append(i)
ti = !python alco.py $i
t.append(float(ti.s))
print n[-1], t[-1]
plot(n, t, '.-')
== alco.py ==
"""Alpha compositing of line plots. Usage: python alco.py NSERIES ALPHA"""
from sys import argv
import numpy as np
import matplotlib as mpl
mpl.use("agg") # noninteractive plotting
from pylab import *
n = int(argv[1])
try:
alpha = float(argv[2])
except IndexError:
alpha = 0.02
# generate some data
x = np.arange(200)
for i in range(n):
y = np.sin(x / (2 * np.pi * x[-1] * i))
plot(x, y, 'k-', alpha=alpha)
savefig("test.png")
|