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

Skip to content

Commit 416d1df

Browse files
committed
Make legend less hacky looking, with a "cute" math expression.
svn path=/trunk/matplotlib/; revision=5619
1 parent 47e1c66 commit 416d1df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/pylab_examples/mathtext_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
ax.text(1, 1.6, tex, fontsize=20, va='bottom')
2222

23-
ax.legend(("Foo", "Testing $x^2$"))
23+
ax.legend([r"$\sqrt{x^2}$"])
2424

2525
ax.set_title(r'$\Delta_i^j \hspace{0.4} \mathrm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20)
26-
#fig.savefig('mathtext_demo')
26+
fig.savefig('mathtext_demo')
2727

2828
show()
2929

0 commit comments

Comments
 (0)