[Matplotlib-users] Using non ascii characters
Hi, I would like to use non ascii characters in title and label but with my current intallation it does not work properly. There's no warning or error messages when I set a title with some non ascii characters (I use iso-88599-1 characters, like é or à), but I get a empty square instead of theses characters in the figure. I'm using matplotlib-0.90.1. Is there anything to configure to handle non ascii characters ? Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using non ascii characters
This probably depends on the backend you are using. Which backend and on which platform are you having trouble with? 0.90.1 had a number of Unicode and non-ascii problems that 0.91.2 resolves. You may want to try that. Failing that, can you attach a small script that exhibits the problem? There may be all kinds of things going wrong, from the encoding of the source file, to an incorrect font etc. and an example would help us narrow it down. Cheers, Mike BL wrote: Hi, I would like to use non ascii characters in title and label but with my current intallation it does not work properly. There's no warning or error messages when I set a title with some non ascii characters (I use iso-88599-1 characters, like é or à), but I get a empty square instead of theses characters in the figure. I'm using matplotlib-0.90.1. Is there anything to configure to handle non ascii characters ? Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using non ascii characters
I'm using a basic Debian Etch distribution. I've attached a very simple file showing the problem. On my computer, neither the title, nor the legend are displayed correctly, and I've got square instead of each non ascii characters. The attached script gives me the following informations : matplotlib : 0.90.1 backend: TkAgg encoding : UTF-8 I will try to install a SVN version of matplotlib and see if this works better. #! /usr/bin/python # -*-coding: utf-8-*- from numpy import arange import pylab as p import matplotlib import sys print matplotlib : , matplotlib.__version__ print backend: , matplotlib.get_backend() print encoding : , sys.getfilesystemencoding() x = arange(10) y = x**2-x+4 p.plot(x, y, 'ro-', label=r'polynôme') p.title(r'à é ï ù') p.xlabel('x') p.legend() p.show() - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users