Skip to content

Commit b1825a8

Browse files
authored
Merge pull request #95 from StefRe/fix/various
Fix various typos and inconsistencies
2 parents c26b5c4 + 59b75b8 commit b1825a8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cheatsheets.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -968,12 +968,12 @@
968968
\hspace*{2.5mm}~$\rightarrow$ fig.savefig("figure.pdf")\\
969969
\textbf{… save a transparent figure?}\\
970970
\hspace*{2.5mm}~$\rightarrow$ fig.savefig("figure.pdf", transparent=True)\\
971-
\textbf{… clear a figure?}\\
972-
\hspace*{2.5mm}~$\rightarrow$ ax.clear()\\
971+
\textbf{… clear a figure/an axes?}\\
972+
\hspace*{2.5mm}~$\rightarrow$ fig.clear() $\rightarrow$ ax.clear()\\
973973
\textbf{… close all figures?}\\
974974
\hspace*{2.5mm}~$\rightarrow$ plt.close("all")\\
975975
\textbf{… remove ticks?}\\
976-
\hspace*{2.5mm}~$\rightarrow$ ax.set\_xticks([])\\
976+
\hspace*{2.5mm}~$\rightarrow$ ax.set\_[xy]ticks([])\\
977977
\textbf{… remove tick labels ?}\\
978978
\hspace*{2.5mm}~$\rightarrow$ ax.set\_[xy]ticklabels([])\\
979979
\textbf{… rotate tick labels ?}\\

scripts/anatomy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def minor_tick(x, pos):
4949
ax.set_xlabel("X axis label")
5050
ax.set_ylabel("Y axis label")
5151

52-
ax.legend()
52+
ax.legend(loc="upper right")
5353

5454

5555
def circle(x, y, radius=0.15):

scripts/annotate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
plt.xlim(0, 6), plt.ylim(0, 1)
1818
plt.xticks([]), plt.yticks([])
1919

20-
plt.annotate("Annotation", (5.5, .75), (0.1, .75), size=16, va="center",
20+
plt.annotate("text", (5.5, .75), (0.75, .75), size=16, va="center", ha="center",
2121
arrowprops=dict(facecolor='black', shrink=0.05))
2222

23-
plt.text( 5.5, 0.6, "xy\nycoords", size=10, va="top", ha="center", color=".5")
23+
plt.text( 5.5, 0.6, "xy\nxycoords", size=10, va="top", ha="center", color=".5")
2424
plt.text( .75, 0.6, "xytext\ntextcoords", size=10, va="top", ha="center", color=".5")
2525

2626
plt.savefig("../figures/annotate.pdf")

0 commit comments

Comments
 (0)