Menu

[r510]: / trunk / users_guide / code / mathtext_demo.py  Maximize  Restore  History

Download this file

22 lines (17 with data), 695 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from matplotlib.matlab import *
# use a custom axes to provide room for the large labels used below
ax = axes([.2, .2, .7, .7], axisbg='y')
# generate some random symbols to plot
x = rand(40)
plot(x[:-1], x[1:], 'go', markeredgecolor='k', markersize=14)
# this is just a made up equation that has nothing to do with the
# plot!
s = r'$\cal{R}\prod_{i=\alpha}^\infty a_i\rm{sin}(2 \pi f x_i)$'
text(0.2, 1.2, s, fontsize=20)
axis([-0.2, 1.2, -0.2, 1.8])
# subscripts, superscripts and groups with {} are supported
xlabel('$\Delta_i^j$', fontsize='x-large')
ylabel('$\Delta_{i+1}^j$', fontsize='x-large')
savefig('../figures/mathtext_demo.eps')
savefig('../figures/mathtext_demo.png')
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.