8000 Fix typos in tips · matplotlib/cheatsheets@1b461e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b461e7

Browse files
committed
Fix typos in tips
I'm not sure what the tip in Performance section is supposed to do, but the slow part plots nothing, and the fast part doesn't run.
1 parent d5bdedd commit 1b461e7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

cheatsheets.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,12 +1000,12 @@
10001000
plot(X, Y, marker="o", ls="") \hfill fast%
10011001
\vskip.5\baselineskip
10021002
%
1003-
\textcolor{red}{for i in range(n): plot(X[i]) \hfill slow}\\
1004-
plot(sum([x+[None] for x in X],[])) \hfill fast%
1003+
\textcolor{red}{for i in range(n): plot(i, X[i], "o") \hfill slow}\\
1004+
plot(X, marker="o", ls="") \hfill fast%
10051005
\vskip.5\baselineskip
10061006
%
1007-
\textcolor{red}{cla(), imshow(…), canvas.draw() \hfill slow}\\
1008-
im.set\_data(…), canvas.draw() \hfill fast%
1007+
\textcolor{red}{cla(); imshow(…); canvas.draw() \hfill slow}\\
1008+
im.set\_data(…); canvas.draw() \hfill fast%
10091009
\vskip.1\baselineskip
10101010
}
10111011
\end{myboxed}

handout-beginner.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ \subsection*{\rmfamily Tweak}
225225
\subsection*{\rmfamily Organize}
226226
% -----------------------------------------------------------------------------
227227

228-
You can plot several data on the the same figure, but you can also
229-
split a figure in several subplots (named {\em Axes}): \medskip
228+
You can plot several data on the same figure, but you can also split a figure
229+
in several subplots (named {\em Axes}): \medskip
230230

231231
% -----------------------------------------------------------------------------
232232
\begin{tabular}{@{}m{.821\linewidth}m{.169\linewidth}}

handout-intermediate.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ \subsection*{\rmfamily Colors}
185185
\vspace{-1em}
186186
\subsection*{\rmfamily Size \& DPI}
187187

188-
Consider a square figure to be included in a two-columns A4 paper with
189-
2cm margins on each side and a column separation of 1cm. The width of
190-
a figure is (21 - 2*2 - 1)/2 = 8cm. One inch being 2.54cm, figure size
191-
should be 3.15$\times$3.15 in.
188+
Consider a square figure to be included in a two-column A4 paper with
189+
2\,cm margins on each side and a column separation of 1\,cm. The width of
190+
a figure is (21 - 2*2 - 1)/2 = 8\,cm. One inch being 2.54\,cm, figure size
191+
should be 3.15$\times$3.15\,in.
192192
\begin{lstlisting}[]
193193
fig = plt.figure(figsize=(3.15, 3.15), dpi=50)
194194
plt.savefig("figure.pdf", dpi=600)

handout-tips.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ \subsection*{\rmfamily Text outline}
153153

154154
% --------------------------------------------------- 58DA --------------------------
155155
\subsection*{\rmfamily Multiline plot}
156-
You can plot several lines at once using None as separator.
156+
You can plot several lines at once using {\em None} as separator.
157157

158158
\begin{lstlisting}
159159
X,Y = [], []

0 commit comments

Comments
 (0)
0