From: Jean-Michel P. <jea...@ar...> - 2005-03-21 09:58:05
|
Hi, Does anyone know why Agg backend does not support non-ASCII chars? I think many non-English speaking users would really appreciate to be able to use their full alphabet in graphics ;-) while taking advantage of the great Agg technique. JM. Philippe ond...@gm... a écrit : > Hello, > in case someone has the same problem as me -- to display accented > letters in matplotlib -- this is how to do it: > > #! /usr/bin/python > # -*- coding: iso-8859-2; -*- > > import matplotlib > matplotlib.use('GTK') > from pylab import * > plot([1,2,3]) > title(u'some accented letters: ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿') > #savefig("pokus.eps") > show() > > Important is "use('GTK')" (Agg backend only shows rectangles instead of > accented letters) and "title(u'some..." (the "u" -- without it it > doesn't work either). > > You can save the figure to *.png, unfortunately saving to *.eps or *.ps > doesn't work (even using different backend). > > Ondrej Certik > |
From: Jean-Michel P. <jea...@ar...> - 2005-03-29 09:28:40
|
jdh...@ac... a écrit : > We are in favor of unicode support in agg, we just haven't had the > time, knowledge or man-power to do it. fonts are hard, as you > probably know, and we have to figure out the right handling in > freetype and the ft2font wrapper, in the pycxx extension generating > code, and in the font manager. All manageable, but tough. It sounds good and I know this is a hard job even if I have no idea of how things get work in matplotlib! Having unicode without Agg is already great to me. > > Have you seen the accented character demo? > > http://matplotlib.sf.net/examples/accented_text.py Yes I have but was a little bit disappointed since this nested expression fails (matplotlib 0.72): \rm{\acute{e}} > Hopefully, someone (maybe you <wink>) will find the time to tackle > unicode support for ft2font, font_manager, and backend_agg in the > not-too-distant-future. > > JDH Believe me I would really be glad to participate to the matplotlib source code. Unfortunately I don't think I have the required skills (unless you know some introducing pages that could change my opinion?) and my company - a research centre - isn't mature enough to let us participate to open source :-(. It is even hard to make people accept open source software for everyday use... They don't feel secure if do not pay for! JM. Philippe |
From: John H. <jdh...@ac...> - 2005-03-30 20:48:11
|
>>>>> "Jean-Michel" == Jean-Michel Philippe <jea...@ar...> writes: Jean-Michel> Yes I have but was a little bit disappointed since Jean-Michel> this nested expression fails (matplotlib 0.72): Jean-Michel> \rm{\acute{e}} This was a parser bug in mathtext which is fixed in CVS. Be sure and let me know when you encounter these kinds of problems since they are usually easy to fix While I was at it, I also implemented unicode support for the *Agg and PS backends :-) If you have access to CVS, you may want to give it a test drive. See examples/unicode_demo.py. CVS mirrors may lag. Jean-Michel> Believe me I would really be glad to participate to Jean-Michel> the matplotlib source code. Unfortunately I don't Jean-Michel> think I have the required skills (unless you know Jean-Michel> some introducing pages that could change my opinion?) Jean-Michel> and my company - a research centre - isn't mature Jean-Michel> enough to let us participate to open source :-(. It Jean-Michel> is even hard to make people accept open source Jean-Michel> software for everyday use... They don't feel secure Jean-Michel> if do not pay for! If they are looking for someone to pay.... :-) JDH |
From: Jean-Michel P. <jea...@ar...> - 2005-04-06 10:19:08
|
jdh...@ac... a écrit : > While I was at it, I also implemented unicode support for the *Agg and > PS backends :-) If you have access to CVS, you may want to give it a > test drive. See examples/unicode_demo.py. CVS mirrors may lag. Wonderful! Unfortunately I don't have enough room on my disk for a compilation from CVS sources and the Debian package isn't out yet... So I'll try next time I boot on Windows! > If they are looking for someone to pay.... :-) > > JDH It would really be a good idea. One never knows, maybe one day? JM. Philippe |
From: John H. <jdh...@ac...> - 2005-03-27 22:01:59
|
>>>>> "Jean-Michel" == Jean-Michel Philippe <jea...@ar...> writes: Jean-Michel> Hi, Does anyone know why Agg backend does not support Jean-Michel> non-ASCII chars? I think many non-English speaking Jean-Michel> users would really appreciate to be able to use their Jean-Michel> full alphabet in graphics ;-) while taking advantage Jean-Michel> of the great Agg technique. We are in favor of unicode support in agg, we just haven't had the time, knowledge or man-power to do it. fonts are hard, as you probably know, and we have to figure out the right handling in freetype and the ft2font wrapper, in the pycxx extension generating code, and in the font manager. All manageable, but tough. Have you seen the accented character demo? http://matplotlib.sf.net/examples/accented_text.py Hopefully, someone (maybe you <wink>) will find the time to tackle unicode support for ft2font, font_manager, and backend_agg in the not-too-distant-future. JDH |