SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
2
(6)
3
(6)
4
(9)
5
(3)
6
(4)
7
8
(8)
9
(4)
10
11
(4)
12
(2)
13
(4)
14
(3)
15
(1)
16
(1)
17
(6)
18
(3)
19
20
(2)
21
(3)
22
(4)
23
(2)
24
(5)
25
(1)
26
27
(3)
28
(3)
29
(3)
30
(1)
31
(2)




Showing 6 results of 6

From: Darren D. <dd...@co...> - 2005年05月17日 23:17:13
On Tuesday 17 May 2005 6:44 pm, John Hunter wrote:
> In honor of Darren trying to get his thesis printed using mpl figures,
> and encountering a lot of pain with fonts and mathtext, I added a
> psfrag latex backend today. psfrag is a latex package that enables
> you to substitute sentinel strings in an eps figure with latex
> expressions (eg as in xfig). You create an eps with a bunch of marker
> strings like "psmarker0" or "psmarker1" and then write a latex file
> that does the substitutions
>
> \psfrag{psmarker0}[bl][bl][2.000000][0.000000]{\TeX\ is Number
> $e^{-i\pi}$!} \psfrag{psmarker1}[bl][bl][1.000000][0.000000]{0}
>
> The LaTeX backend generates a *.eps file and a *.tex file. You can
> then latex and dvips the tex file to get a true ps, or just embed the
> generated latex commands directly into your document. This uses latex
> for all text elements, giving a unified font look and feel.
I don't know what to say, except, Thank you.
> Here is an example
>
> > python examples/tex_demo.py -dLaTeX
> > latex tex_demo.tex
> > dvips -o tex_demo.ps tex_demo.dvi
> > ggv tex_demo.ps
>
> There are a few problems
>
> * the page width and figure placement in the latex document are off
> center
>
> * the text color is not being respected
>
> * to get the width and height of the string, I tex the individual
> strings separately, run dvips on them, and get the bounding box
> from the generated file. This all happens with caching in
> matplotlib.texmanager. Right now the fontsize is being ignored in
> this process so the layout will be off for nonstandard font sizes
> -- anything other than the default design size of latex which
> defaults to 10pt I think.
>
> * the text doesn't scale right if you provide a size arg to
> includegraphics, eg [width=3D4.in]
>
> I'm sure these details can be worked out by someone who has the
> patience to read the psfrag manual closely and knows a bit about tex
> and dvips -- the backend is only 180 lines of code. I'm kind of busy
> right now with other work, so I was hoping some enterprising soul
> would like to take this and run with it, polish it, fix it and test
> it.... Darren? If not, I'll get to it as I can.
>
> Changes in CVS
I'll be on a bus 24 of the next 60 hours, to get to my brother's graduation=
=2E=20
I'll print out what is in cvs and the psfrag manual for the trip, and can't=
=20
wait to get my hands on the code when I get back.
Darren
From: John H. <jdh...@ac...> - 2005年05月17日 22:44:43
In honor of Darren trying to get his thesis printed using mpl figures,
and encountering a lot of pain with fonts and mathtext, I added a
psfrag latex backend today. psfrag is a latex package that enables
you to substitute sentinel strings in an eps figure with latex
expressions (eg as in xfig). You create an eps with a bunch of marker
strings like "psmarker0" or "psmarker1" and then write a latex file
that does the substitutions
\psfrag{psmarker0}[bl][bl][2.000000][0.000000]{\TeX\ is Number $e^{-i\pi}$!}
\psfrag{psmarker1}[bl][bl][1.000000][0.000000]{0}
The LaTeX backend generates a *.eps file and a *.tex file. You can
then latex and dvips the tex file to get a true ps, or just embed the
generated latex commands directly into your document. This uses latex
for all text elements, giving a unified font look and feel.
Here is an example
 > python examples/tex_demo.py -dLaTeX
 > latex tex_demo.tex
 > dvips -o tex_demo.ps tex_demo.dvi
 > ggv tex_demo.ps
There are a few problems
 * the page width and figure placement in the latex document are off
 center
 * the text color is not being respected
 * to get the width and height of the string, I tex the individual
 strings separately, run dvips on them, and get the bounding box
 from the generated file. This all happens with caching in
 matplotlib.texmanager. Right now the fontsize is being ignored in
 this process so the layout will be off for nonstandard font sizes
 -- anything other than the default design size of latex which
 defaults to 10pt I think.
 * the text doesn't scale right if you provide a size arg to
 includegraphics, eg [width=4.in]
I'm sure these details can be worked out by someone who has the
patience to read the psfrag manual closely and knows a bit about tex
and dvips -- the backend is only 180 lines of code. I'm kind of busy
right now with other work, so I was hoping some enterprising soul
would like to take this and run with it, polish it, fix it and test
it.... Darren? If not, I'll get to it as I can.
Changes in CVS
JDH
From: John H. <jdh...@ac...> - 2005年05月17日 15:56:32
>>>>> "Patrik" == Patrik Simons <pat...@ne...> writes:
 Patrik> # Should show orange bars, but shows white, grey, and
 Patrik> black bars. from matplotlib.pylab import * figure() t =
 Patrik> [1,2,3] bar(t, t, color=(1.0, 0.5, 0.0)) show()
 Patrik> The culprit is len(left)!=3 in bar() and barh():
 Patrik> if (is_string_like(color) or (iterable(color) and
 Patrik> len(color)==3 and len(left)!=3) or not iterable(color)):
 Patrik> color = [color]*len(left)
 Patrik> Is this surprising behavior really what you want?
This is a corner case. matplotlib is pretty friendly when you set
colors. In particular, it allows you to use a float and it interprets
it as grayscale or an rgb tuple. What you are bumping into is the
unusual case when the length of your data is exactly three, and it is
ambiguous whether you want three grayscale values, different for each
bar, or a single rgb value for all three bars. It wouldn't happen
with 10 bars because a 10 length tuple of grayscale floats is not
ambiguous.
You can disambiguate by using hex strings or colorname strings
 colors = 'white', 'gray', 'black'
 bar(t,t,color=colors)
Hope this helps,
JDH
From: Patrik S. <pat...@ne...> - 2005年05月17日 12:52:48
The function set_ticklabels() breaks if given unicode labels. Calling
str() on a unicode string doesn't always work.
--- axis.py.orig	2005年03月28日 06:29:11.000000000 +0300
+++ axis.py	2005年05月17日 15:01:48.000000000 +0300
@@ -734,7 +734,13 @@
 instances.
 
 ACCEPTS: sequence of strings"""
- ticklabels = [str(l) for l in ticklabels]
+ tl = []
+ for l in ticklabels:
+ if isinstance(l, basestring):
+ tl.append(l)
+ else:
+ tl.append(str(l))
+ ticklables = tl
 
 self.set_major_formatter( FixedFormatter(ticklabels) )
-- 
Patrik
From: Patrik S. <pat...@ne...> - 2005年05月17日 12:52:47
# Should show orange bars, but shows white, grey, and black bars.
from matplotlib.pylab import *
figure()
t = [1,2,3]
bar(t, t, color=(1.0, 0.5, 0.0))
show()
The culprit is len(left)!=3 in bar() and barh():
 if (is_string_like(color) or
 (iterable(color) and len(color)==3 and len(left)!=3) or
 not iterable(color)):
 color = [color]*len(left)
Is this surprising behavior really what you want?
-- 
Patrik
From: Matt N. <new...@ca...> - 2005年05月17日 01:47:48
Hi Ken,
Thanks for the report. It seems sort of odd that this
doesn't show up on Windows or Mac, but it does seem like 
a fine idea to force the args of SetWidth, etc to be 
integers.
I'll change this in cvs. Thanks!!
--Matt
On 2005年5月16日, Ken McIvor wrote:
> While trying out the new printing support in matplotlib 0.80's WxAgg backend, 
> I encountered the following DeprecationWarning when calling 
> FigureCanvasWxAgg.Printer_Preview().
> 
> /usr/lib/python2.3/site-packages/wxPython/gdi.py:77: DeprecationWarning:
> integer argument expected, got float
> val = gdic.wxBitmap_SetWidth(self, *_args, **_kwargs)
> /usr/lib/python2.3/site-packages/wxPython/gdi.py:80: DeprecationWarning:
> integer argument expected, got float
> val = gdic.wxBitmap_SetHeight(self, *_args, **_kwargs)
> 
> A little digging located the problem in backend_wx.PrintoutWx.OnPrintPage() on 
> lines 1906 and 1907. Wrapping a call to int() around the arguments of 
> SetWidth() and SetHeight() there solves this problem.
> 
> I'm not sure that a two line change warrents a patch, but I'll happily submit 
> one if asked.
> 
> Ken
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 

Showing 6 results of 6

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 によって変換されたページ (->オリジナル) /