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
(13)
2
(11)
3
(2)
4
(4)
5
(28)
6
(17)
7
(28)
8
(6)
9
(6)
10
11
12
(9)
13
(13)
14
(21)
15
(16)
16
(6)
17
(3)
18
(3)
19
(8)
20
(15)
21
(33)
22
(10)
23
(17)
24
(2)
25
(5)
26
(23)
27
(18)
28
(6)



Showing results of 322

<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)
From: <kc1...@ya...> - 2007年02月26日 21:14:34
I installed gsview and gs and tried it. AFAIK, gs didn't seen to complain=
. I also tried GIMP. While it didn't complain, the picture displayed is=
 horribly bad.=0A=0A> =0A> An "invalidrestore" error signals an improper re=
store.=0A> E.g., a string, dictionary, or procedure is left on the =0A> sta=
ck that needs to be discarded before restore.=0A> Probably a dictionary wit=
h no 'end'.=0A> =0A> Two obvious possibilities:=0A> =0A> - there is an inva=
lid restore. This should be fixed.=0A> - something is wrong with the Word =
interpreter (quite =0A> possible given its history, but perhaps surprisin=
g=0A> for this particular problem)=0A> =0A> Does GhostScript report the s=
ame error?=0A> =0A> fwiw,=0A> Alan Isaac=0A=0A =0A--=0AJohn Henry=0A=0A
From: <kc1...@ya...> - 2007年02月26日 21:10:36
Switching to PDF works (eventually - see below) but bring with it yet anoth=
er set of problems.=0A=0AFirst of all, I had to fix backend_pdf.py for MPL =
to work (w Python 2.3, anyway).=0A=0ATwo problems:=0A=0Aa) 2.3 doesn't have=
 the sorted function - it uses a .sort() function. So, I had to change lin=
e 487 from:=0A=0Achars=3Dsorted(charmap.keys())=0A=0Ato:=0A=0Achars =3D cha=
rmap.keys()=0Achars.sort()=0A=0Ab) No update() function (line 396)=0A=0ASo,=
 instead of:=0A xobjects.update([(name, value[0]) for (name, value) =
in self.markers.items()])=0A=0AHad to do:=0A=0A for (name, value) in=
 self.markers.items():=0A xobjects[name]=3Dvalue[0]=0A=0AAfter t=
hat, I got my pdf file. However, if I print the PDF directly, works fine b=
ut when I create an object link to the PDF and print from inside Word, the =
printout is degraded (kind of fuzzy with texts).=0A=0ASo, for a temporary w=
ork around, I can use PDF instead of EPS and hopefully that problem will ge=
t fixed someday.=0A=0A> -----Original Message-----=0A> From: matplotlib-use=
rs-...@li... =0A> [mailto:matplotlib-users-bounces@list=
s.sourceforge.net] On =0A> Behalf Of Jouni K. Sepp=E4nen=0A> Sent: Monday, =
February 26, 2007 9:56 AM=0A> To: mat...@li...=0A=
> Subject: Re: [Matplotlib-users] invalidrestore=0A> =0A> =0A> kc106_2005-m=
atp...@ya... writes:=0A> =0A> > Back to the subject at hand. Using P=
NG files works but =0A> brings with it =0A> > other problems and so I would=
 really appreciate a =0A> resolution to this =0A> > "invalidrestore" issue.=
 I can't use PDF because I have to =0A> embedd the =0A> > plots in a Word d=
ocument. Not sure what SVG is (I'll look it up).=0A> =0A> In my (admittedly=
 limited) experience Word handles pdf files =0A> much better than eps files=
. I just tried (in MS Word 2004 for =0A> Mac) Insert / Picture / From File =
and selected a file =0A> produced by Matplotlib's pdf backend, and Word see=
ms to embed =0A> it just fine. (I can't test printing right now, though.)=
=0A> =0A> -- =0A> Jouni K. Sepp=E4nen=0A> http://www.iki.fi/jks=0A=0A =0A--=
=0AJohn Henry=0A=0A
From: Mark B. <ma...@gm...> - 2007年02月26日 21:05:32
Eric, list -
Here is the new aspect function for possible inclusion in pylab.
It works great and with the default values for the kwargs, it works exactly
the way I think it is useful for a combination of contouring and plotting.
What do you think, should we include this?
Mark
def aspect(*args, **kwargs):
 """
 Set/Get the aspect ratio (ylength/xlength) of the current axis
 Aspect ratio is defined as unit-length-along-y-axis /
unit-length-along-x-axis
 If no arguments are passed, the current aspect ratio is returned
 Aspect ratio may be met by changing size of axes while keeping data
limits fixed (called 'box'),
 or by changing data limits while keeping the lengths of the axes fixed
(called 'datalim')
 One point remains fixed, which is called the anchor, for example the
center (called 'C')
 Autoscaling may be turned on (limits may change upon next plotting
command)
 or off (limits will remain fixed)
 Keyword arguments:
 adjustable: 'box' (default), 'datalim'
 anchor: 'C' (default), 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'
 fixlim: True (default), False
 """
 ax = gca()
 if len(args)==0:
 aspect = ax.get_aspect()
 elif len(args)==1:
 aspect = args[0]
 adjustable = popd(kwargs,'adjustable','box')
 anchor = popd(kwargs,'anchor','C')
 fixlim = popd(kwargs,'fixlim',True)
 ax.set_aspect(aspect,adjustable,anchor)
 if fixlim:
 ax.set_autoscale_on(False)
 else:
 ax.set_autoscale_on(True)
 ax.autoscale_view()
 draw_if_interactive()
 return aspect
From: <jk...@ik...> - 2007年02月26日 18:39:24
Lionel Roubeyrie <lro...@li...> writes:
> Fonts are BitStream VeraSans-Roman, TrueType.
Then this is not the usual font problem where fonts get converted
either into Type 3 or into raw drawing commands. Can you put example
files (both eps and pdf) on some website so we can try to understand
what is wrong with them?
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Nicolas G. <nic...@ga...> - 2007年02月26日 18:34:02
T24gMi8yNi8wNywgTGlvbmVsIFJvdWJleXJpZSA8bHJvdWJleXJpZUBsaW1haXIuYXNzby5mcj4g
d3JvdGU6Cj4gSSBqdXN0IHdhbnQgdG8gc2V0IHhsYWJlbHMgd2l0aCA6Cj4gTU9JUz1bJ2phbnZp
ZXInLAo+IHUnZsOpdnJpZXInLCAnbWFycycsICdhdnJpbCcsICdtYWknLCAnanVpbicsICdqdWls
bGV0JywgJ2FvdXQnLAo+ICdzZXB0ZW1icmUnLCAnb2N0b2JyZScsICdub3ZlbWJyZScsIHUnZMOp
Y2VtYnJlJ10KPiByZXN1bHRpbmcgaW4gJ2Y/dnJpZXInIGFuZCAnZD9jZW1icmUnIGluIHRoZSBw
ZGYgZmlsZS4KCk9rLiBUaGlzIGlzIGV4YWN0bHkgd2hhdCBJIGRvIHdpdGggbWF0cGxvdGxpYiwg
YnV0IEkgdXNlIHRoZSBtb3N0CnJlY2VudCB2ZXJzaW9uIGNoZWNrZWQgb3V0IGZyb20gU3VidmVy
c2lvbiByZXBvc2l0b3J5LiBDYW4geW91IGluc3RhbGwKbWF0cGxvdGxpYiBvbiB5b3VyIHN5c3Rl
bSwgZGlyZWN0bHkgZnJvbSBTdWJ2ZXJzaW9uLCBhbmQgdGVzdCB5b3VyCnNjcmlwdCBhZ2Fpbj8K
From: Alan G I. <ai...@am...> - 2007年02月26日 18:17:05
An "invalidrestore" error signals an improper restore.
E.g., a string, dictionary, or procedure is left on the 
stack that needs to be discarded before restore.
Probably a dictionary with no 'end'.
Two obvious possibilities:
- there is an invalid restore. This should be fixed.
- something is wrong with the Word interpreter (quite 
 possible given its history, but perhaps surprising
 for this particular problem)
Does GhostScript report the same error?
fwiw,
Alan Isaac
From: <jk...@ik...> - 2007年02月26日 17:57:00
kc1...@ya... writes:
> Back to the subject at hand. Using PNG files works but brings with it
> other problems and so I would really appreciate a resolution to this
> "invalidrestore" issue. I can't use PDF because I have to embedd the
> plots in a Word document. Not sure what SVG is (I'll look it up).
In my (admittedly limited) experience Word handles pdf files much
better than eps files. I just tried (in MS Word 2004 for Mac) Insert /
Picture / From File and selected a file produced by Matplotlib's pdf
backend, and Word seems to embed it just fine. (I can't test printing
right now, though.)
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: <kc1...@ya...> - 2007年02月26日 17:34:51
Thanks for the answer, John.=0A=0AUp to this point, the other software pack=
age we use produces EPS files only and so I've been using it this way for a=
 while. May not be the best way but I've tried other EPS viewers and so fa=
r Word actually is the best way since I have to embedd the plots into Word =
reports.=0A=0ABack to the subject at hand. Using PNG files works but bring=
s with it other problems and so I would really appreciate a resolution to t=
his "invalidrestore" issue. I can't use PDF because I have to embedd the p=
lots in a Word document. Not sure what SVG is (I'll look it up).=0A=0AReg=
ards,=0A=0A=0A> =0A> Using PS/EPS in Word or any office product is a pretty=
 =0A> unusual combination. My experience is that they are not =0A> support=
ed s well as other image formats. Will PNG work for =0A> you? That is wha=
t I usually use for Office. You may also =0A> consider PDF or SVG if you n=
eed vector graphics.=0A> =0A> JDH=0A>=0A =0A--=0AJohn Henry=0A=0A
From: Lionel R. <lro...@li...> - 2007年02月26日 17:03:46
Hi Nicolas,
I just want to set xlabels with :
MOIS=3D['janvier',=20
u'f=E9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', 'aout',
'septembre', 'octobre', 'novembre', u'd=E9cembre']
resulting in 'f?vrier' and 'd?cembre' in the pdf file.
Le Lundi 26 F=E9vrier 2007 17:01, Nicolas Grilly a =E9crit=A0:
> Hello Lionel,
>
> On 2/26/07, Lionel Roubeyrie <lro...@li...> wrote:
> > sorry to resend this problem, I didn't have any response and the problem
> > always exists, all accentued characters are set to "?" when I save
> > figures in pdf format. Does someone have a solution to that?
> > MPL 0.87.7 on Edgy Eft
>
> Can you send me a little test script showing what you are trying to
> do? I'll run it with the patched PDF backend. I use this backend daily
> to produce PDF files containing accentuated characters.
>
> Thanks,
>
> Nicolas
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Lionel Roubeyrie - lro...@li...
Chag=E9 d'=E9tudes et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Lionel R. <lro...@li...> - 2007年02月26日 17:01:34
Hi,
=46onts are BitStream VeraSans-Roman, TrueType.
Le Lundi 26 F=E9vrier 2007 16:43, Jouni K. Sepp=E4nen a =E9crit=A0:
> What exactly is the problem with the converted pdf file? Try opening
> it in Adobe Reader and viewing Document Properties / Fonts. Do you see
> any "Type 3" fonts, and what are their names?
=2D-=20
Lionel Roubeyrie - lro...@li...
Chag=E9 d'=E9tudes et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Nicolas G. <nic...@ga...> - 2007年02月26日 16:01:51
Hello Lionel,
On 2/26/07, Lionel Roubeyrie <lro...@li...> wrote:
> sorry to resend this problem, I didn't have any response and the problem
> always exists, all accentued characters are set to "?" when I save figures in
> pdf format. Does someone have a solution to that?
> MPL 0.87.7 on Edgy Eft
Can you send me a little test script showing what you are trying to
do? I'll run it with the patched PDF backend. I use this backend daily
to produce PDF files containing accentuated characters.
Thanks,
Nicolas
From: <jk...@ik...> - 2007年02月26日 15:44:20
Lionel Roubeyrie <lro...@li...> writes:
> Le Lundi 26 Février 2007 14:20, Darren Dale a écrit :
>> What are you using to do the conversion? epstopdf should maintain the
>> integrity of the fonts.
> epstopdf should maintain... but not, it doesn't do that! 
What exactly is the problem with the converted pdf file? Try opening
it in Adobe Reader and viewing Document Properties / Fonts. Do you see
any "Type 3" fonts, and what are their names?
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: John H. <jd...@gm...> - 2007年02月26日 14:37:57
On 2/25/07, kc1...@ya...
<kc1...@ya...> wrote:
> After doing some investigation, I discovered that this problem is reproducible using sample programs such as axes_demo.py. Here are the steps I took:
>
> a) Run axes_demo.py
> b) Save the plot as eps file
> c) Start Word
> d) Insert the eps file
> e) Print
Using PS/EPS in Word or any office product is a pretty unusual
combination. My experience is that they are not supported s well as
other image formats. Will PNG work for you? That is what I usually
use for Office. You may also consider PDF or SVG if you need vector
graphics.
JDH
From: Lionel R. <lro...@li...> - 2007年02月26日 14:19:41
Le Lundi 26 F=E9vrier 2007 14:20, Darren Dale a =E9crit=A0:
> What are you using to do the conversion? epstopdf should maintain the
> integrity of the fonts.
epstopdf should maintain... but not, it doesn't do that!=20
=2D-=20
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: Darren D. <dd...@co...> - 2007年02月26日 13:50:42
On Sunday 25 February 2007 12:41:58 pm kc1...@ya... wrote:
> After doing some investigation, I discovered that this problem is
> reproducible using sample programs such as axes_demo.py. Here are the
> steps I took:
>
> a) Run axes_demo.py
> b) Save the plot as eps file
> c) Start Word
> d) Insert the eps file
> e) Print
>
> I got a 2 page print: 1 for the plot, and 1 for the error message
> invalidrestore.
>
> Could somebody please try and see if it fails the same on their system?
I don't have Microsoft Word, so I can't test this. Considering how matplotlib 
creates eps files that are compatible with latex, ghostscript, etc., I wonder 
if this is a problem with Word.
Darren
From: Darren D. <dd...@co...> - 2007年02月26日 13:21:13
On Monday 26 February 2007 06:53:22 am Lionel Roubeyrie wrote:
> Le Lundi 26 F=E9vrier 2007 12:35, Jouni K. Sepp=E4nen a =E9crit=A0:
> > Does saving the figure as eps and converting to pdf work for you? The
> > pdf backend doesn't support unicode, since I've never been able to
> > really understand how encoding strings in pdf works. (Nicolas Grilly's
> > recent patch fixed something related to encodings, so perhaps he
> > understands them better?)
> >
> > Patches are of course welcome. I'm afraid I'm currently too busy with
> > my day job to do any major hacking on the pdf backend.
>
> Hi Jouni,
> converting eps to pdf works, but fonts are not well rendered, and I need
> very high quality results for our publisher.
What are you using to do the conversion? epstopdf should maintain the=20
integrity of the fonts.
From: Lionel R. <lro...@li...> - 2007年02月26日 11:53:47
Le Lundi 26 F=E9vrier 2007 12:35, Jouni K. Sepp=E4nen a =E9crit=A0:
> Does saving the figure as eps and converting to pdf work for you? The
> pdf backend doesn't support unicode, since I've never been able to
> really understand how encoding strings in pdf works. (Nicolas Grilly's
> recent patch fixed something related to encodings, so perhaps he
> understands them better?)
>
> Patches are of course welcome. I'm afraid I'm currently too busy with
> my day job to do any major hacking on the pdf backend.
Hi Jouni,
converting eps to pdf works, but fonts are not well rendered, and I need ve=
ry=20
high quality results for our publisher.
=2D-=20
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: <jk...@ik...> - 2007年02月26日 11:35:53
Lionel Roubeyrie <lro...@li...> writes:
> sorry to resend this problem, I didn't have any response and the
> problem always exists, all accentued characters are set to "?" when
> I save figures in pdf format. Does someone have a solution to that?
Does saving the figure as eps and converting to pdf work for you? The
pdf backend doesn't support unicode, since I've never been able to
really understand how encoding strings in pdf works. (Nicolas Grilly's
recent patch fixed something related to encodings, so perhaps he
understands them better?)
Patches are of course welcome. I'm afraid I'm currently too busy with
my day job to do any major hacking on the pdf backend.
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Lionel R. <lro...@li...> - 2007年02月26日 11:13:51
Hi,
sorry to resend this problem, I didn't have any response and the problem 
always exists, all accentued characters are set to "?" when I save figures in 
pdf format. Does someone have a solution to that?
MPL 0.87.7 on Edgy Eft
thanks
-- 
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
Hi all,
Sorry about the steady stream of help requests. I haven't been able to 
figure out a couple of things:
- How can I make my figures and axes transparent by default?
- When I inserted some of my old pdf plots into a latex presentation, to 
my surprise their foreground color had changed from black to the color 
of the text in the presentation. Is there a way to signal to Matplotlib 
that I would like this to happen? Can I make this behavior default?
Many thanks,
Anand Patil
From: Anand P. <an...@so...> - 2007年02月26日 03:09:35
It works! What beeyootiful plots. Man, that is SO MUCH nicer than 
Matlab's stanky old X11 b@#?*&^%. And contrary to something I think I 
remember you saying on an earlier thread, I could swear it's faster than 
TkAgg by a long shot.
Two wrinkles: It pops up a blank plot before showing the first plot the 
user requests, and I can't get it to work in interactive mode. On the 
(good) chance you're aware of those and working on it, sorry.
Thanks,
Anand
Charlie Moad wrote:
> On 2/21/07, Anand Patil <an...@so...> wrote:
>
>>
>> From the matplotlib-devel list:
>>
>> >On 2/14/07, Michiel Jan Laurens de Hoon <mdehoon@c2...> wrote:
>> >> Dear Charles,
>> >>
>> >> I was trying to use your cocoa-agg backend for matplotlib, but it 
>> seems
>> >> to have a problem to read Matplotlib.nib. Opening this nib with
>> >> Interface Builder also gives an error. It appears that the 
>> problem is
>> >> caused by the file keyedobjects.nib in the Matplotlib.nib folder. 
>> If I
>> >> run plutil on keyedobjects.nib, it crashes. The other two files in
>> >> Matplotlib.nib look fine. So I was wondering if it is possible 
>> that the
>> >> keyedobjects.nib file included in matplotlib is damaged. If so, 
>> do you
>> >> have a valid copy of this file?
>> >>
>> >> Many thanks in advance,
>> >>
>> >> --Michiel de Hoon.
>> >
>> >We recently moved the data files, and I think the nib files got
>> >interpreted as text instead of binary files. I grabbed an old copy
>> >from a previous source release and committed them as binary. They
>> >should work now.
>> >
>> >- Charlie
>>
>> I just downloaded
>> /trunk/matplotlib/lib/matplotlib/backends/Matplotlib.nib, rev 3022 on
>> svn. When I tried to use it, this happened:
>>
>> In [1]: figure()
>> 2007年02月21日 15:00:51.611 Python[813] *** NSThread: ignoring exception
>> '*** -[NSKeyedUnarchiver decodeObjectForKey:]: missing class information
>> for object' that raised during delayed perform of target 0x3b308c0 and
>> selector 'startWithBundle:'
>>
>> I wasn't able to open the nib package with the interface builder, and
>> plutil crashed on keyedobjects.nib (I don't know what plutil is supposed
>> to do). I'm using a PPC G4 running OS X 10.4.
>>
>> Thanks much,
>> Anand
>
>
> Sorry it took some time, but I tried committing fresh non-binary nibs.
> Please try again now.
From: Charlie M. <cw...@gm...> - 2007年02月26日 01:58:13
On 2/21/07, Anand Patil <an...@so...> wrote:
>
> From the matplotlib-devel list:
>
> >On 2/14/07, Michiel Jan Laurens de Hoon <mdehoon@c2...> wrote:
> >> Dear Charles,
> >>
> >> I was trying to use your cocoa-agg backend for matplotlib, but it seems
> >> to have a problem to read Matplotlib.nib. Opening this nib with
> >> Interface Builder also gives an error. It appears that the problem is
> >> caused by the file keyedobjects.nib in the Matplotlib.nib folder. If I
> >> run plutil on keyedobjects.nib, it crashes. The other two files in
> >> Matplotlib.nib look fine. So I was wondering if it is possible that the
> >> keyedobjects.nib file included in matplotlib is damaged. If so, do you
> >> have a valid copy of this file?
> >>
> >> Many thanks in advance,
> >>
> >> --Michiel de Hoon.
> >
> >We recently moved the data files, and I think the nib files got
> >interpreted as text instead of binary files. I grabbed an old copy
> >from a previous source release and committed them as binary. They
> >should work now.
> >
> >- Charlie
>
> I just downloaded
> /trunk/matplotlib/lib/matplotlib/backends/Matplotlib.nib, rev 3022 on
> svn. When I tried to use it, this happened:
>
> In [1]: figure()
> 2007年02月21日 15:00:51.611 Python[813] *** NSThread: ignoring exception
> '*** -[NSKeyedUnarchiver decodeObjectForKey:]: missing class information
> for object' that raised during delayed perform of target 0x3b308c0 and
> selector 'startWithBundle:'
>
> I wasn't able to open the nib package with the interface builder, and
> plutil crashed on keyedobjects.nib (I don't know what plutil is supposed
> to do). I'm using a PPC G4 running OS X 10.4.
>
> Thanks much,
> Anand
Sorry it took some time, but I tried committing fresh non-binary nibs.
 Please try again now.
From: Matt A. <ma...@ph...> - 2007年02月25日 22:43:00
The trick is that you want the image coordinates in *screen* coordinates, not
printer coordinates. The image coordinates will be screen coordinates if you
obtain the imgheight/imgwidth by multipying the figure height/width by 80,
not 100. The DPI won't matter if you are manually setting the height/width
in the img tag. Alternatively, you could set dpi=80 and skip the
imgheight/imgwidth entries altogether (and reformat the vertices correctly
for the imagemap input without using the imgheight...). If for some reason
you want the displayed image to be larger/smaller than the selected size
(here 4inx4in), multiply the matplotlib coordinates by the ratio of the
image scaling factor and 80. Ie in your example, multiply the coordinates by
100./80. to obtain the correct coordinates for the image size that you have
chosen (here 400pix/400pix instead of the 'natural' size of 320x320 based
upon the PNG being a 4"x4" image).
Matt
Rajarshi Guha-3 wrote:
> 
> Hi, I'm trying to generate a barplot and subsequently dumping it to a
> PNG file and making an HTML imagemap out of it. I've pasted my code
> below.
> 
> The problem is that the coordinates I need to supply for the imagemap
> don't seem to be correct.
> 
> I'm getting the screen coordinates using:
> 
> coords = []
> for rectangle in b:
> 
> vertices = rectangle.get_verts()
> 
> top_left = get_top_left(vertices)
> lower_right = get_lower_right(vertices)
> 
> trans = rectangle.get_transform()
> top_left = trans.xy_tup(top_left)
> lower_right = trans.xy_tup(lower_right)
> 
> coords.append( (top_left, lower_right) )
> 
> 
> 
-- 
View this message in context: http://www.nabble.com/trying-to-get-screen-coordinates-for-bars-tf3280553.html#a9150522
Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi,
On 2/25/07, Jouni K. Sepp=E4nen <jk...@ik...> wrote:
> I suppose these things could be addressed quite neatly by IPython.
> It could even modify your history similarly to what it currently
> does with the %magic commands, so that when you type
Feel free to play with implementing this, it's easy to do so on your
personal setup, since input prefilter can be trivially added by any
user. Once you find a set of tools that you're happy with, just send
them my way and we'll include them officially.
Here's some links you may find useful:
http://ipython.scipy.org/doc/manual/node7.html#SECTION00073000000000000000
http://ipython.scipy.org/doc/manual/node11.html
the code for these extensions ships already with ipython, under
IPython/Extensions.
Look at the one for quantities with units, it's a good starting point
for what you want to do.
> Perhaps the namespace issue could also be addressed at the IPython
> level. The pylab profile could import the various packages, perhaps
> with some kind of abbreviated names, and rewrite commands like
Ditto.
Regards,
f
From: <kc1...@ya...> - 2007年02月25日 17:42:12
After doing some investigation, I discovered that this problem is reproduci=
ble using sample programs such as axes_demo.py. Here are the steps I took=
:=0A=0Aa) Run axes_demo.py=0Ab) Save the plot as eps file=0Ac) Start Word=
=0Ad) Insert the eps file =0Ae) Print=0A=0AI got a 2 page print: 1 for the =
plot, and 1 for the error message invalidrestore.=0A=0ACould somebody pleas=
e try and see if it fails the same on their system? =0A=0A> -----Original =
Message-----=0A> From: mat...@li... =0A> =
[mailto:mat...@li...] On =0A> Behalf Of k=
c10...@ya...=0A> Sent: Friday, February 23, 2007 4:42 PM=
=0A> To: mat...@li...=0A> Subject: Re: [Matplotli=
b-users] invalidrestore=0A> =0A> =0A> Thanks for pointing that out, Eric.=
=0A> =0A> I try that and it did turn my plot 90 degree. The bad news =0A>=
 is that GSview imports it upside down and if I want to view =0A> the plot =
on the screen, I have to rotate it downside up =0A> first. (Hey, I should=
n't complain. At least I can print =0A> without wasting a piece of paper f=
or each plot).=0A> =0A> So, looks like it's true that something MPL did to =
the eps =0A> file is causing Word to spit out that error page. I wish I =
=0A> know what it is.=0A> =0A> The problem of not finding out is that I nee=
d to send these =0A> plots to clients. I don't want to require that they h=
ave an =0A> .eps viewer in order to see my plots...=0A> =0A> Regards=0A> =
=0A> =0A> =0A> > -----Original Message-----=0A> > From: Eric Firing [mailto=
:ef...@ha...]=0A> > Sent: Friday, February 23, 2007 3:07 PM=0A> > To=
: kc1...@ya...=0A> > Cc: mat...@li...urcefo=
rge.net=0A> > Subject: Re: [Matplotlib-users] invalidrestore=0A> > =0A> > =
=0A> > kc1...@ya... wrote:=0A> > > I installed gsview an=
d gscript and tried it. The good =0A> > news is that when I print from in=
side gsview, the error page=0A> > is gone. The bad news is that the oriten=
tation is wrong. My =0A> > plot is designed for landscape. From word, I s=
et the page =0A> > setup to landscape, import the picture, and print. But =
with =0A> > gsview, it imports my plot 90 degree wrong. Changing =0A> > o=
rientation flips the whole page 90 degree but the plot gets =0A> > rotated =
as well and so it still prints wrong.=0A> > > =0A> > > I guess I have no ch=
oice but to regress step by step and=0A> > see which MPL=0A> > > feature ag=
grevated this condition.=0A> > > =0A> > =0A> > Did you try saving the figur=
e using the orientation kwarg? This is=0A> > intended for postscript outpu=
t.=0A> > =0A> > e.g.=0A> > =0A> > from pylab import figure, show, close=0A>=
 > fig =3D figure()=0A> > ax =3D fig.add_subplot(1,1,1)=0A> > ax.plot([0,1]=
, [0,1])=0A> > fig.savefig('myplot.ps', orientation=3D'landscape')=0A> > cl=
ose(fig)=0A> > =0A> > Eric=0A> > =0A> =0A> --=0A> John Henry=0A> =0A> =0A>=
 =0A> --------------------------------------------------------------=0A> --=
---------=0A> Take Surveys. Earn Cash. Influence the Future of IT=0A> Join =
SourceForge.net's Techsay panel and you'll get the =0A> chance to share you=
r opinions on IT & business topics through =0A> brief surveys-and earn cash=
 =0A> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge=0A=
&CID=3DDEVDEV=0A_______________________________________________=0AMatplotli=
b-users mailing list Mat...@li...=0Ahttps://lists=
.sourceforge.net/lists/listinfo/matplotlib-users=0A=0A =0A--=0AJohn Henry=
=0A=0A
1 message has been excluded from this view by a project administrator.

Showing results of 322

<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)
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 によって変換されたページ (->オリジナル) /