|
From: Michael D. <md...@st...> - 2013-05-15 13:33:42
|
Which backend are you using? I can't reproduce. Does https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py work for you? Mike On 05/15/2013 06:40 AM, Ojala Janne wrote: > I have a weird problem with Unicode strings. I am using windows 7 with > Python 2.7.2 64 bit, and matplotlib 1.2.1 (package from Unofficial Windows > Binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib ). > > When i run: > -*- coding: utf-8 -*- > import matplotlib.pyplot as plt > > fig = plt.figure( ) > > ax = fig.add_subplot(111) > ax.hist([1,2,3,4,5,6,7,8,9,10], bins=range(1,11) ) > > plt.ylabel(u'ä') > fig.savefig('test.eps') > > I get a crash: > >> pythonw -u "bugtest.py" >> Exit code: -1073740777 > but if i modify my code to read: > -*- coding: utf-8 -*- > import matplotlib.pyplot as plt > > fig = plt.figure( ) > > ax = fig.add_subplot(111) > ax.hist([1,2,3,4,5,6,7,8,9,10], bins=range(1,11) ) > > plt.ylabel(u'äł') > fig.savefig('test.eps') > > Then no longer crashes. Why is it that "a umlaut" alone crashes > but when the string contains a "l stroke" character the Unicode string > behaves fine. In both cases it works fine if I show the plot but not when > I write eps either in code or when saving. > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |