SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: John H. <jdh...@ac...> - 2004年01月27日 18:35:44
 http://matplotlib.sourceforge.net
 	
What's new in matplotlib 0.42
EPS output from PS backend
 Just add an eps extension
PS and EPS save from GTK and WX backends with bugs fixed
 A few of the bugs that were lingering in the PS output from the GTK
 backend have been cleared up. A fairly substantial refactoring of
 the Text class enabled this. Text is now backend independent and
 behaves like the other artists in the figure (lines, patches,
 etc). Additionally, PS and EPS save from WX backend work
Object picker example
 The file examples/object_picker.py is a template showing how to
 select objects in the figure with the mouse(eg, text, lines). If you
 click on the line, a properties dialog will pop up. You can edit the
 line properties. This is just a template for those who want to
 develop a GUI properties dialog. If interested, contact the mailing
 list. It would be straight forward to extend this example to allow
 you to move objects in the figure, etc
From: LUK S. <shu...@po...> - 2004年01月30日 16:14:43
John Hunter wrote:
>>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
> 
> 
> LUK> Yes. I did "python log_demo.py", got the gtk GUI and clicked
> LUK> on the "save" icon to produce the eps file. So it is as you
> LUK> said, it comes from the GUI backend. No warning when I did
> LUK> "python log_demo.py -dPS"
> 
> OK, now we at least know where the problem is. I don't get such an
> error message on my system (rhl9, pygtk-2.0.0). What platform are you
> on, and what versions of GTK and pygtk are you running?
> 
> JDH
> 
> 
> 
W2K, Enthought python 2.3, pygtk 2.0, gtk 2.0
Regards,
ST
From: John H. <jdh...@ac...> - 2004年02月08日 03:24:11
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 >> OK, now we at least know where the problem is. I don't get
 >> such an error message on my system (rhl9, pygtk-2.0.0). What
 >> platform are you on, and what versions of GTK and pygtk are you
 >> running? JDH
 >> 
 LUK> W2K, Enthought python 2.3, pygtk 2.0, gtk 2.0
Hi Luk,
I get the same error message on my WinXP platform. I recently
decoupled the text code from the various backends (gtk, ps, etc). In
the past, each backend specified their own default font, and this is
no longer possible since text is now backend independent. On the
upside, this enables you to save PS or EPS from a GTK or WX GUI
window. On the downside, this exposes the problem that font choosing
is not backend independent. We've talked a number of times about the
importance of this on matplotlib-devel, but haven't done the dirty
work of actually getting it implemented.
So in a nutshell, there is nothing wrong with your setup. We on the
development side just need to spend some time getting fonts
standardized across backends. Ie, we need to agree on a bare minimum
number of fonts with standard names that we can provide on all the
backends, so scripts using these names will work on all the backends.
This is complicated by the fact that most fonts are proprietary, so we
can't ship them or guarantee their existence on a given system.
It's on the list of things to do. If this proves to be a major
impediment for you in the mean time, don't hesitate to bring it up
again. Sometimes those who complain the loudest get their bugs fixed
the soonest.
JDH
From: John H. <jdh...@ac...> - 2004年02月11日 16:16:34
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 >> OK, now we at least know where the problem is. I don't get
 >> such an error message on my system (rhl9, pygtk-2.0.0). What
 >> platform are you on, and what versions of GTK and pygtk are you
 >> running? JDH
 LUK> W2K, Enthought python 2.3, pygtk 2.0, gtk 2.0
Tracked this one down. Apparently the latest version of GTK for
windows does different font aliasing. This is controlled by the file
c:\gtk\etc\pango\pango.aliases
Try adding the line:
times = "times new roman,angsana new,mingliu,simsun,gulimche,ms gothic,latha,mangal,code2000"
If you get other font messages, adding more font aliases to this file
may help.
I'm making some changes in the gtk backend - mapping times -> serif,
so in the next release of matplotlib this should be fixed
automagically.
JDH
From: LUK S. <shu...@po...> - 2004年01月31日 03:51:13
John Hunter wrote:
> http://matplotlib.sourceforge.net
> 	
> What's new in matplotlib 0.42
> 
> EPS output from PS backend
> 
> Just add an eps extension
> 
> PS and EPS save from GTK and WX backends with bugs fixed
> 
[snipped]
Thanks very much. I did an upgrade via CVS and the eps output works fine.
A slight glitch though. I think John has changed the AFMPATH 
environmental variable to MATPLOTLIBDATA (which is a more appropriate 
name) so people installing matplotlib in non-default places will have to 
set it instead.
Regards,
ST
--
From: LUK S. <shu...@po...> - 2004年01月31日 08:13:58
John Hunter wrote:
> http://matplotlib.sourceforge.net
> 	
> What's new in matplotlib 0.42
> 
> EPS output from PS backend
> 
> Just add an eps extension
> 
> PS and EPS save from GTK and WX backends with bugs fixed
> 
[snipped]
Thanks very much. I did an upgrade via CVS and the eps output works fine.
A slight glitch though. I think John has changed the AFMPATH
environmental variable to MATPLOTLIBDATA (which is a more appropriate
name) so people installing matplotlib in non-default places will have to
set it instead.
Regards,
ST
--
From: John H. <jdh...@ac...> - 2004年01月31日 03:47:10
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> A slight glitch though. I think John has changed the AFMPATH
 LUK> environmental variable to MATPLOTLIBDATA (which is a more
 LUK> appropriate name) so people installing matplotlib in
 LUK> non-default places will have to set it instead.
ps backend is setup to use both, the idea that you may have some AFM
files independent of matplotlib, and some that ship with matplotlib.
The MATPLOTLIBDATA is indeed for people installing in nonstandard
places. But if AFMPATH is not working for you, I need to know since
this is a bug.
Thanks!
John Hunter
From: LUK S. <shu...@po...> - 2004年01月30日 13:57:57
John Hunter wrote:
>>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
> 
> 
> LUK> A slight glitch though. I think John has changed the AFMPATH
> LUK> environmental variable to MATPLOTLIBDATA (which is a more
> LUK> appropriate name) so people installing matplotlib in
> LUK> non-default places will have to set it instead.
> 
> ps backend is setup to use both, the idea that you may have some AFM
> files independent of matplotlib, and some that ship with matplotlib.
> The MATPLOTLIBDATA is indeed for people installing in nonstandard
> places. But if AFMPATH is not working for you, I need to know since
> this is a bug.
> 
> Thanks!
> John Hunter
> 
I think that's an oversight of mine. I had AFMPATH set to point to the directory 
which holds the afm, xpm files etc before I upgrade. After upgrading I got the 
error described above and I found out that I have to set MATPLOTLIBDATA. I did 
not realize that AFMPATH is *still* used.
I have tex installed so I hope I can use quite a lot more fonts now. Is the path 
to the .afm files all that is needed? Do I have to set anything else, for 
example where to find the pfa/pfb files? I found that matplotlib spits out 
warnings like
** (log_demo.py:1264): WARNING **: Couldn't load font "Times 9.599609375"
falling back to "Sans 9.599609375"
Regards,
ST
From: John H. <jdh...@ac...> - 2004年01月30日 14:08:07
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> I have tex installed so I hope I can use quite a lot more
 LUK> fonts now. Is the path to the .afm files all that is needed?
 LUK> Do I have to set anything else, for example where to find the
 LUK> pfa/pfb files? I found that matplotlib spits out warnings
 LUK> like
All matplotlib needs is the *.afm files. It uses this to compute text
lengths, etc, for layout. You'll just need to provide the right font
names to the text commands, perhaps using a font dictionary as in
examples/text_themes.py. Your postscript output device will still
need to know about the fonts of course. Note that I use a custom font
matching scheme in backend_ps and I certainly don't claim that it is
ideal. So if you encounter strange behavior, let me know.
 LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times
 LUK> 9.599609375" falling back to "Sans 9.599609375"
This doesn't look like a backend_ps error. Have you upgraded to
matplotlib-0.42.2? I've reworked text handling in the backends so
it's hard for me to compare what I've got now without knowing what
version of matplotlib you're using.
JDH
From: LUK S. <shu...@po...> - 2004年01月30日 14:54:15
John Hunter wrote:
>>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
> 
> 
> LUK> I have tex installed so I hope I can use quite a lot more
> LUK> fonts now. Is the path to the .afm files all that is needed?
> LUK> Do I have to set anything else, for example where to find the
> LUK> pfa/pfb files? I found that matplotlib spits out warnings
> LUK> like
> 
> All matplotlib needs is the *.afm files. It uses this to compute text
> lengths, etc, for layout. You'll just need to provide the right font
> names to the text commands, perhaps using a font dictionary as in
> examples/text_themes.py. Your postscript output device will still
> need to know about the fonts of course. Note that I use a custom font
> matching scheme in backend_ps and I certainly don't claim that it is
> ideal. So if you encounter strange behavior, let me know.
> 
> LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times
> LUK> 9.599609375" falling back to "Sans 9.599609375"
> 
> This doesn't look like a backend_ps error. Have you upgraded to
> matplotlib-0.42.2? I've reworked text handling in the backends so
> it's hard for me to compare what I've got now without knowing what
> version of matplotlib you're using.
> 
> JDH
> 
CVS.
ST
From: John H. <jdh...@ac...> - 2004年01月30日 15:30:52
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times
 LUK> 9.599609375" falling back to "Sans 9.599609375"
 LUK> CVS.
Are you sure you are getting this message from the PS backend??? This
looks more like a message coming from one of the GUI backends. I
don't generate any error messages like this in matplotlib.
With a fresh cvs checkout:
hunter:~/tmp/matplotlib> grep -ri 'falling back to' .
turns up nothing.
JDH
From: LUK S. <shu...@po...> - 2004年01月30日 15:47:22
John Hunter wrote:
>>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
> 
> LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times
> LUK> 9.599609375" falling back to "Sans 9.599609375"
> 
> LUK> CVS.
> 
> Are you sure you are getting this message from the PS backend??? This
> looks more like a message coming from one of the GUI backends. I
> don't generate any error messages like this in matplotlib.
> 
> With a fresh cvs checkout:
> 
> hunter:~/tmp/matplotlib> grep -ri 'falling back to' .
> 
> turns up nothing.
> 
> JDH
> 
> 
> 
> 
Yes. I did "python log_demo.py", got the gtk GUI and clicked on the "save" icon 
to produce the eps file. So it is as you said, it comes from the GUI backend. No 
warning when I did "python log_demo.py -dPS"
Regards,
ST
--
From: John H. <jdh...@ac...> - 2004年01月30日 16:00:31
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> Yes. I did "python log_demo.py", got the gtk GUI and clicked
 LUK> on the "save" icon to produce the eps file. So it is as you
 LUK> said, it comes from the GUI backend. No warning when I did
 LUK> "python log_demo.py -dPS"
OK, now we at least know where the problem is. I don't get such an
error message on my system (rhl9, pygtk-2.0.0). What platform are you
on, and what versions of GTK and pygtk are you running?
JDH
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 によって変換されたページ (->オリジナル) /