You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(7) |
2
(12) |
3
(7) |
4
(23) |
5
(5) |
6
(7) |
7
(4) |
|
8
(7) |
9
(25) |
10
(17) |
11
(25) |
12
(11) |
13
(8) |
14
(6) |
|
15
(1) |
16
(22) |
17
(11) |
18
(12) |
19
(22) |
20
(32) |
21
(9) |
|
22
(4) |
23
(16) |
24
(5) |
25
(9) |
26
(26) |
27
(21) |
28
(14) |
|
29
(6) |
30
(8) |
31
(4) |
|
|
|
|
|
From: Aman T. <ama...@gm...> - 2010-08-12 20:58:17
|
Hi Simon, I'm fairly sure its just a contour plot with different color mappings for the lines and the fill. There are several examples of this on the site. Start here: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contour Best of Luck, Aman On Thu, Aug 12, 2010 at 4:44 PM, Simon Friedberger < sim...@a-... <simon%2Bm...@a-...>> wrote: > Hi list members. > > Does anybody know how to create the graph in the middle of this > http://matplotlib.sourceforge.net/_static/logo_sidebar_horiz.png > image on the homepage. I can't find it in the examples and suspect it > may have been taken out in a previous revision. Does anybody remember? > > Best > Simon > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Aman Thakral B.Eng & Biosci, M.Eng Design |
|
From: Simon F. <sim...@a-...> - 2010-08-12 20:44:51
|
Hi list members. Does anybody know how to create the graph in the middle of this http://matplotlib.sourceforge.net/_static/logo_sidebar_horiz.png image on the homepage. I can't find it in the examples and suspect it may have been taken out in a previous revision. Does anybody remember? Best Simon |
|
From: Jouni S. <jk...@ik...> - 2010-08-12 18:50:04
|
Harry Boer <henriaboer@...> writes: > This is e-TeX, Version 3.141592-2.1 (Web2C 7.5.2) > This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) These are different versions. Do you have two different TeX distributions installed on your computer? > ~ Harry$ which latex > /usr/local/bin/latex I think TeX Live installs in /usr/texbin on Mac OS X, although it could make symlinks in /usr/local/bin. Perhaps /usr/texbin/latex is the version you want. Jouni Seppänen |
|
From: Jeremy C. <jlc...@gm...> - 2010-08-12 18:35:02
|
I have a problem with the scaling of the numbers on a colorbar. The problem occurs when the numbers used as colorbar labels need to be scaled (i.e. by 1E3). The colorbar correctly puts the scaling value on the top of the colorbar, but instead of of multiplying by a scale factor, addition is used instead. See the attached script and figure for example. In the example, it looks like the color scale goes from 0 to 2*5E3. At least, that's what I thought when I first looked at it. Instead it means 5000 to 5002. Is there anyway I can scale the colorbar labels by *multiplying* them by a scaling factor instead of *adding* a scaling factor? That seems more intuitive to me and those I work with. Jeremy |
|
From: Harry B. <hen...@gm...> - 2010-08-12 17:31:57
|
Jouni, I think you're right. If I run LaTeX from the command line I get the error message: warning: Could not open char translation file `cp8bit.tcx'. This is e-TeX, Version 3.141592-2.1 (Web2C 7.5.2) kpathsea: Running mktexfmt latex.efmt fmtutil: unknown format type: latex.efmt. I can't find the format file `latex.efmt'! But if I run it from TeXShop it runs perfectly: This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) \write18 enabled. entering extended mode and---- ~ Harry$ which latex /usr/local/bin/latex I don't know whether this is the right forum, but could you tell me how to fix this? I'm running OS X 10.6.4. Thanks, Harry On 8/12/10 4:37 PM, mat...@li... wrote: > Send Matplotlib-users mailing list submissions to > mat...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > or, via email, send a message with subject or body 'help' to > mat...@li... > > You can reach the person managing the list at > mat...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Matplotlib-users digest..." > > > Today's Topics: > > 1. PNG without transparency (Miha Tom?i?) > 2. TeX not working with Matplotlib (Harry Boer) > 3. Re: TeX not working with Matplotlib (Jouni Sepp?nen) > 4. Re: Hints on sizing plot elements? (Tony S Yu) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Aug 2010 08:56:06 +0200 > From: Miha Tom?i?<mih...@gm...> > Subject: [Matplotlib-users] PNG without transparency > To: mat...@li... > Message-ID: > <AAN...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Hello! > > I am having trouble saving figures to PNG with Agg backend. The problem is I > can't get a PNG without transparency even if I specify: > > fig.savefig("colorAgg.png", dpi=300, transparent=False) > > identify still indicates there is a 1-bit aplha channel present: > > Image: colorAgg.png > Format: PNG (Portable Network Graphics) > Class: DirectClass > Geometry: 390x300+0+0 > Resolution: 118.11x118.11 > Print size: 3.30201x2.54001 > Units: PixelsPerCentimeter > Type: TrueColorMatte > Endianess: Undefined > Colorspace: RGB > Depth: 8-bit > Channel depth: > red: 8-bit > green: 8-bit > blue: 8-bit > alpha: 1-bit > Channel statistics: > red: > min: 0 (0) > max: 255 (1) > mean: 192.918 (0.756542) > standard deviation: 96.4001 (0.37804) > green: > min: 0 (0) > max: 255 (1) > mean: 189.457 (0.74297) > standard deviation: 98.0884 (0.38466) > blue: > min: 0 (0) > max: 255 (1) > mean: 177.814 (0.697309) > standard deviation: 107.593 (0.421932) > opacity: > min: 0 (0) > max: 0 (0) > mean: 0 (0) > standard deviation: 0 (0) > Histogram: > 75477: (255,255,255, 0) #FFFFFF white > 8184: ( 9,106, 37, 0) #096A25 rgb(9,106,37) > 8119: (113,170, 76, 0) #71AA4C rgb(113,170,76) > 8119: (204, 0, 0, 0) #CC0000 rgb(204,0,0) > 6655: ( 0, 0, 0, 0) #000000 black > 3466: ( 1, 1, 1, 0) #010101 rgb(1,1,1) > 2482: (106,106,106, 0) #6A6A6A rgb(106,106,106) > 287: ( 3, 44, 15, 0) #032C0F rgb(3,44,15) > 285: ( 47, 71, 31, 0) #2F471F rgb(47,71,31) > 285: ( 85, 0, 0, 0) #550000 rgb(85,0,0) > 215: ( 2, 2, 2, 0) #020202 rgb(2,2,2) > 196: (116,116,116, 0) #747474 rgb(116,116,116) > ... > ---------------------------------------------------------------- > > This is not a big deal but there si a problem when I insert this PNGs in PDF > and there si a RGB/CMYK conversion on every page that contains transparent > PNG. > > How can I get rid of the aplha channel completely? How do I tell the backend > to work (or at least save) in pure RGB not in RGBA color space? > > Thanks and take care, > Miha > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Thu, 12 Aug 2010 09:46:41 +0200 > From: Harry Boer<h....@bc...> > Subject: [Matplotlib-users] TeX not working with Matplotlib > To: mat...@li... > Message-ID:<4C6...@bc...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi there, > > I'm trying to render text with LaTeX using the example on page 53 of the > Matplotlib tutorial; see source code and output below. > It's not working. divipng, (latest)Ghostscript, and LaTeX are all > installed; their executables > in my PATH. Matplotlib is working flawlessly. Help is appreciated. > Thanks, Harry > > $gs > GPL Ghostscript 8.71 (2010-02-10) > Copyright (C) 2010 Artifex Software, Inc. All rights reserved. > This software comes with NO WARRANTY: see the file PUBLIC for details. > GS> > > $dvipng > This is dvipng 1.12 Copyright 2002-2008 Jan-Ake Larsson > > > #EXAMPLE TUTORIAL page 53 > #!/Library/Frameworks/Python.framework/Versions/Current/bin/python > > from matplotlib import rc > from numpy import arange, cos, pi > from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \ > grid, savefig, show > > > rc('text', usetex=True) > rc('font', family='serif') > figure(1, figsize=(6,4)) > ax = axes([0.1, 0.1, 0.8, 0.7]) > t = arange(0.0, 1.0+0.01, 0.01) > s = cos(2*2*pi*t)+2 > plot(t, s) > > xlabel(r'\textbf{time (s)}') > ylabel(r'\textit{voltage (mV)}',fontsize=16) > title(r"\TeX\ is Number > $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", > fontsize=16, color='r') > grid(True) > savefig('tex_demo') > > show() > > > ###OUTPUT##### > > warning: Could not open char translation file `cp8bit.tcx'. > kpathsea: Running mktexfmt latex.efmt > fmtutil: unknown format type: latex.efmt. > Traceback (most recent call last): > File "tex.py", line 34, in<module> > savefig('tex_demo') > File > "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pyplot.py", > line 356, in savefig > return fig.savefig(*args, **kwargs) > File > "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/figure.py", > line 1032, in savefig > self.canvas.print_figure(*args, **kwargs) > --------AND A LOT OF MORE OUTPUT LIKE THE ABOVE-------------- > string:\n%s\nHere is the full report generated by LaTeX: \n\n'% > repr(tex)) + report) > RuntimeError: LaTeX was not able to process the following string: > '$0.0$' > Here is the full report generated by LaTeX: > > This is e-TeX, Version 3.141592-2.1 (Web2C 7.5.2) > I can't find the format file `latex.efmt'! > > > Harry > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 3 > Date: Thu, 12 Aug 2010 10:41:41 +0000 (UTC) > From: Jouni Sepp?nen<jk...@ik...> > Subject: Re: [Matplotlib-users] TeX not working with Matplotlib > To: mat...@li... > Message-ID:<loo...@po...> > Content-Type: text/plain; charset=utf-8 > > Harry Boer<h.boer@...> writes: > >> kpathsea: Running mktexfmt latex.efmt >> fmtutil: unknown format type: latex.efmt. > Sounds like your LaTeX installation is broken. Can you run latex by hand? Is it > the same binary that matplotlib ends up calling? > > Jouni Sepp?nen > > > > > > ------------------------------ > > Message: 4 > Date: Thu, 12 Aug 2010 10:37:10 -0400 > From: Tony S Yu<ts...@gm...> > Subject: Re: [Matplotlib-users] Hints on sizing plot elements? > To: Russell E. Owen<ro...@uw...> > Cc: mat...@li... > Message-ID:<E1F...@gm...> > Content-Type: text/plain; charset="us-ascii" > > > On Aug 12, 2010, at 1:08 AM, Russell E. Owen wrote: > >> I'm making a strip chart widget (which I plan to make publicly available >> when finished). The basics are working fine, but the automatic sizing is >> not doing so well. Strip charts are typically short, and when suitably >> short the X axis annotations are partially truncated. >> >> So...can I convince the automatic sizer to always show the full X (time) >> axis annotations and put all the variable sizing into the data area? Or >> do I have to manually set them somehow? > As far as I know, there's nothing to automatically resize the padding around the the axes. (The manual way to do it is to call `fig.subplots_adjust`). I wrote a helper script (attached below) to adjust the layout so that there's a specified amount of padding around the axes. > > Unfortunately, this resizer doesn't function correctly when using the GTK backend. It apparently works fine with TkAgg, MacOSX, and Qt4Agg backends. > > >> Also, is there a way from my software (not a .matplotlibrc file) to >> globally make the default background color white for axis annotation >> areas? Right now the background is gray for annotations and while for >> plot area and I'd prefer it was all white. >> >> -- Russell > > Just set plt.rc('figure', facecolor='w') in your code (assuming you've imported matplotlib.pyplot as plt). > > Best, > -Tony > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: tight_layout.py > Type: text/x-python-script > Size: 6017 bytes > Desc: not available > -------------- next part -------------- > > > Usage note: Since it sounds like you're not creating subplots, you can just use the `tight_borders` function, instead of the `tight_layout` function; the later requires two redraws while the first requires only one. > > > ------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > > ------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > End of Matplotlib-users Digest, Vol 51, Issue 24 > ************************************************ |
|
From: Benjamin R. <ben...@ou...> - 2010-08-12 15:24:07
|
On Thu, Aug 12, 2010 at 1:56 AM, Miha Tomšič <mih...@gm...> wrote:
> Hello!
>
> I am having trouble saving figures to PNG with Agg backend. The problem is
> I can't get a PNG without transparency even if I specify:
>
> fig.savefig("colorAgg.png", dpi=300, transparent=False)
>
> identify still indicates there is a 1-bit aplha channel present:
>
> Image: colorAgg.png
> Format: PNG (Portable Network Graphics)
> Class: DirectClass
> Geometry: 390x300+0+0
> Resolution: 118.11x118.11
> Print size: 3.30201x2.54001
> Units: PixelsPerCentimeter
> Type: TrueColorMatte
> Endianess: Undefined
> Colorspace: RGB
> Depth: 8-bit
> Channel depth:
> red: 8-bit
> green: 8-bit
> blue: 8-bit
> alpha: 1-bit
> Channel statistics:
> red:
> min: 0 (0)
> max: 255 (1)
> mean: 192.918 (0.756542)
> standard deviation: 96.4001 (0.37804)
> green:
> min: 0 (0)
> max: 255 (1)
> mean: 189.457 (0.74297)
> standard deviation: 98.0884 (0.38466)
> blue:
> min: 0 (0)
> max: 255 (1)
> mean: 177.814 (0.697309)
> standard deviation: 107.593 (0.421932)
> opacity:
> min: 0 (0)
> max: 0 (0)
> mean: 0 (0)
> standard deviation: 0 (0)
> Histogram:
> 75477: (255,255,255, 0) #FFFFFF white
> 8184: ( 9,106, 37, 0) #096A25 rgb(9,106,37)
> 8119: (113,170, 76, 0) #71AA4C rgb(113,170,76)
> 8119: (204, 0, 0, 0) #CC0000 rgb(204,0,0)
> 6655: ( 0, 0, 0, 0) #000000 black
> 3466: ( 1, 1, 1, 0) #010101 rgb(1,1,1)
> 2482: (106,106,106, 0) #6A6A6A rgb(106,106,106)
> 287: ( 3, 44, 15, 0) #032C0F rgb(3,44,15)
> 285: ( 47, 71, 31, 0) #2F471F rgb(47,71,31)
> 285: ( 85, 0, 0, 0) #550000 rgb(85,0,0)
> 215: ( 2, 2, 2, 0) #020202 rgb(2,2,2)
> 196: (116,116,116, 0) #747474 rgb(116,116,116)
> ...
> ----------------------------------------------------------------
>
> This is not a big deal but there si a problem when I insert this PNGs in
> PDF and there si a RGB/CMYK conversion on every page that contains
> transparent PNG.
>
> How can I get rid of the aplha channel completely? How do I tell the
> backend to work (or at least save) in pure RGB not in RGBA color space?
>
> Thanks and take care,
> Miha
>
>
>
Miha,
The documentation states that the 'transparent' kwarg controls whether the
background of the figure and the axes will be transparent. It does not
control the transparency of the figure elements.
I dug a little further and also found that the code that writes PNG files
can only save in RGBA mode and has no capability of writing in RGB mode. It
might be "possible", but it certainly isn't doable through a function
argument. New code will have to be written.
If you would like, you can file a feature request for this at
http://sourceforge.net/tracker/?group_id=80706
In the meantime, I believe it is possible to use ImageMagick:
*convert img-rgba.png -flatten img-rgb.png*
I hope that helps.
Ben Root
|
|
From: Tony S Yu <ts...@gm...> - 2010-08-12 14:37:47
|
On Aug 12, 2010, at 1:08 AM, Russell E. Owen wrote:
> I'm making a strip chart widget (which I plan to make publicly available
> when finished). The basics are working fine, but the automatic sizing is
> not doing so well. Strip charts are typically short, and when suitably
> short the X axis annotations are partially truncated.
>
> So...can I convince the automatic sizer to always show the full X (time)
> axis annotations and put all the variable sizing into the data area? Or
> do I have to manually set them somehow?
As far as I know, there's nothing to automatically resize the padding around the the axes. (The manual way to do it is to call `fig.subplots_adjust`). I wrote a helper script (attached below) to adjust the layout so that there's a specified amount of padding around the axes.
Unfortunately, this resizer doesn't function correctly when using the GTK backend. It apparently works fine with TkAgg, MacOSX, and Qt4Agg backends.
> Also, is there a way from my software (not a .matplotlibrc file) to
> globally make the default background color white for axis annotation
> areas? Right now the background is gray for annotations and while for
> plot area and I'd prefer it was all white.
>
> -- Russell
Just set plt.rc('figure', facecolor='w') in your code (assuming you've imported matplotlib.pyplot as plt).
Best,
-Tony
|
|
From: Jouni S. <jk...@ik...> - 2010-08-12 10:42:02
|
Harry Boer <h.boer@...> writes: > kpathsea: Running mktexfmt latex.efmt > fmtutil: unknown format type: latex.efmt. Sounds like your LaTeX installation is broken. Can you run latex by hand? Is it the same binary that matplotlib ends up calling? Jouni Seppänen |
|
From: Harry B. <h....@bc...> - 2010-08-12 08:13:32
|
Hi there,
I'm trying to render text with LaTeX using the example on page 53 of the
Matplotlib tutorial; see source code and output below.
It's not working. divipng, (latest)Ghostscript, and LaTeX are all
installed; their executables
in my PATH. Matplotlib is working flawlessly. Help is appreciated.
Thanks, Harry
$gs
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>
$dvipng
This is dvipng 1.12 Copyright 2002-2008 Jan-Ake Larsson
#EXAMPLE TUTORIAL page 53
#!/Library/Frameworks/Python.framework/Versions/Current/bin/python
from matplotlib import rc
from numpy import arange, cos, pi
from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \
grid, savefig, show
rc('text', usetex=True)
rc('font', family='serif')
figure(1, figsize=(6,4))
ax = axes([0.1, 0.1, 0.8, 0.7])
t = arange(0.0, 1.0+0.01, 0.01)
s = cos(2*2*pi*t)+2
plot(t, s)
xlabel(r'\textbf{time (s)}')
ylabel(r'\textit{voltage (mV)}',fontsize=16)
title(r"\TeX\ is Number
$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
fontsize=16, color='r')
grid(True)
savefig('tex_demo')
show()
###OUTPUT#####
warning: Could not open char translation file `cp8bit.tcx'.
kpathsea: Running mktexfmt latex.efmt
fmtutil: unknown format type: latex.efmt.
Traceback (most recent call last):
File "tex.py", line 34, in <module>
savefig('tex_demo')
File
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pyplot.py",
line 356, in savefig
return fig.savefig(*args, **kwargs)
File
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/figure.py",
line 1032, in savefig
self.canvas.print_figure(*args, **kwargs)
--------AND A LOT OF MORE OUTPUT LIKE THE ABOVE--------------
string:\n%s\nHere is the full report generated by LaTeX: \n\n'%
repr(tex)) + report)
RuntimeError: LaTeX was not able to process the following string:
'$0.0$'
Here is the full report generated by LaTeX:
This is e-TeX, Version 3.141592-2.1 (Web2C 7.5.2)
I can't find the format file `latex.efmt'!
Harry
|
|
From: Miha T. <mih...@gm...> - 2010-08-12 06:56:13
|
Hello!
I am having trouble saving figures to PNG with Agg backend. The problem is I
can't get a PNG without transparency even if I specify:
fig.savefig("colorAgg.png", dpi=300, transparent=False)
identify still indicates there is a 1-bit aplha channel present:
Image: colorAgg.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 390x300+0+0
Resolution: 118.11x118.11
Print size: 3.30201x2.54001
Units: PixelsPerCentimeter
Type: TrueColorMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Channel statistics:
red:
min: 0 (0)
max: 255 (1)
mean: 192.918 (0.756542)
standard deviation: 96.4001 (0.37804)
green:
min: 0 (0)
max: 255 (1)
mean: 189.457 (0.74297)
standard deviation: 98.0884 (0.38466)
blue:
min: 0 (0)
max: 255 (1)
mean: 177.814 (0.697309)
standard deviation: 107.593 (0.421932)
opacity:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: 0 (0)
Histogram:
75477: (255,255,255, 0) #FFFFFF white
8184: ( 9,106, 37, 0) #096A25 rgb(9,106,37)
8119: (113,170, 76, 0) #71AA4C rgb(113,170,76)
8119: (204, 0, 0, 0) #CC0000 rgb(204,0,0)
6655: ( 0, 0, 0, 0) #000000 black
3466: ( 1, 1, 1, 0) #010101 rgb(1,1,1)
2482: (106,106,106, 0) #6A6A6A rgb(106,106,106)
287: ( 3, 44, 15, 0) #032C0F rgb(3,44,15)
285: ( 47, 71, 31, 0) #2F471F rgb(47,71,31)
285: ( 85, 0, 0, 0) #550000 rgb(85,0,0)
215: ( 2, 2, 2, 0) #020202 rgb(2,2,2)
196: (116,116,116, 0) #747474 rgb(116,116,116)
...
----------------------------------------------------------------
This is not a big deal but there si a problem when I insert this PNGs in PDF
and there si a RGB/CMYK conversion on every page that contains transparent
PNG.
How can I get rid of the aplha channel completely? How do I tell the backend
to work (or at least save) in pure RGB not in RGBA color space?
Thanks and take care,
Miha
|
|
From: Russell E. O. <ro...@uw...> - 2010-08-12 05:08:55
|
I'm making a strip chart widget (which I plan to make publicly available when finished). The basics are working fine, but the automatic sizing is not doing so well. Strip charts are typically short, and when suitably short the X axis annotations are partially truncated. So...can I convince the automatic sizer to always show the full X (time) axis annotations and put all the variable sizing into the data area? Or do I have to manually set them somehow? Also, is there a way from my software (not a .matplotlibrc file) to globally make the default background color white for axis annotation areas? Right now the background is gray for annotations and while for plot area and I'd prefer it was all white. -- Russell |