Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8022c79

Browse files
committed
Fix encoding in these files. unicode_demo.py was in latin-1, though the coding marker said utf-8 (someone's editor didn't listen... ;) tex_unicode_demo.py was converted to utf-8 to be Sphinx compatible.
svn path=/trunk/matplotlib/; revision=6227
1 parent 016622c commit 8022c79

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/pylab_examples/tex_unicode_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# -*- coding: latin-1 -*-
2+
# -*- coding: utf-8 -*-
33
"""
44
This demo is tex_demo.py modified to have unicode. See that file for
55
more information.
@@ -18,7 +18,7 @@
1818
plot(t, s)
1919

2020
xlabel(r'\textbf{time (s)}')
21-
ylabel(unicode(r'\textit{Velocity (°/sec)}','latin-1'),fontsize=16)
21+
ylabel(unicode(r'\textit{Velocity (°/sec)}','latin-1'),fontsize=16)
2222
title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
2323
fontsize=16, color='r')
2424
grid(True)

examples/pylab_examples/unicode_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
from pylab import *
55
plot([1,2,4])
6-
title( unicode('Développés et fabriqués', 'latin-1') )
7-
xlabel( unicode("réactivité nous permettent d'être sélectionnés et adoptés", 'latin-1') )
6+
title( unicode('Développés et fabriqués', 'latin-1') )
7+
xlabel( unicode("réactivité nous permettent d'être sélectionnés et adoptés", 'latin-1') )
88
ylabel( unicode('Andr\xc3\xa9 was here!', 'utf-8') )
9-
text( 0.5, 2.5, unicode('Institut für Festkörperphysik', 'latin-1'), rotation=45)
9+
text( 0.5, 2.5, unicode('Institut für Festkörperphysik', 'latin-1'), rotation=45)
1010
text( 1, 1.5, u'AVA (check kerning)')
1111

1212
savefig('test')

0 commit comments

Comments
 (0)