Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 864138f

Browse filesBrowse files
sindunuragarpQuLogic
authored andcommitted
Removed unused code + made unicode example clearer + added back plot args
1 parent 7802749 commit 864138f
Copy full SHA for 864138f

File tree

Expand file treeCollapse file tree

1 file changed

+3
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-7
lines changed

‎examples/text_labels_and_annotations/tex_demo.py

Copy file name to clipboardExpand all lines: examples/text_labels_and_annotations/tex_demo.py
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
described at http://matplotlib.org/users/usetex.html
1010
properly installed on your system. The first time you run a script
1111
you will see a lot of output from tex and associated tools. The next
12-
time, the run may be silent, as a lot of the information is cached in
13-
~/.tex.cache
12+
time, the run may be silent, as a lot of the information is cached.
1413
1514
Notice how the the label for the y axis is provided using unicode!
1615
@@ -26,14 +25,11 @@
2625
t = np.linspace(0.0, 1.0, 100)
2726
s = np.cos(4 * np.pi * t) + 2
2827

29-
t = np.arange(0.0, 1.0 + 0.01, 0.01)
30-
s = np.cos(2*2*np.pi*t) + 2
31-
3228
fig, ax = plt.subplots(figsize=(6, 4), tight_layout=True)
3329
ax.plot(t, s)
3430

3531
ax.set_xlabel(r'\textbf{time (s)}')
36-
ax.set_ylabel('\\textit{Velocity (\u00B0/sec)}')
32+
ax.set_ylabel('\\textit{Velocity (\N{DEGREE SIGN}/sec)}', fontsize=16)
3733
ax.set_title(r'\TeX\ is Number $\displaystyle\sum_{n=1}^\infty'
38-
r'\frac{-e^{i\pi}}{2^n}$!')
34+
r'\frac{-e^{i\pi}}{2^n}$!', fontsize=16, color='r')
3935
plt.show()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.