Revision: 5936
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5936&view=rev
Author: mdboom
Date: 2008-07-31 14:44:07 +0000 (Thu, 31 Jul 2008)
Log Message:
-----------
Don't use fancy Unicode on a narrow Python build.
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py
Modified: trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py 2008-07-31
14:10:18 UTC (rev 5935)
+++ trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py 2008-07-31
14:44:07 UTC (rev 5936)
@@ -13,10 +13,13 @@
r'$\mathrm{\mathbb{Blackboard \pi}}$',
r'$\mathbf{\mathbb{Blackboard \pi}}$',
r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$',
- r'$\mathscr{Script}$',
-# ur'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
- ]
+ r'$\mathscr{Script}$']
+if sys.maxunicode > 0xffff:
+ stests.append(
+ ur'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
+ )
+
from pylab import *
def doall():
@@ -28,7 +31,7 @@
axis([0, 3, -len(tests), 0])
yticks(arange(len(tests)) * -1)
for i, s in enumerate(tests):
- print (i, s)
+ print (i, s.encode("ascii", "backslashreplace"))
text(0.1, -i, s, fontsize=32)
savefig('stix_fonts_example')
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins