Skip to content

Commit e98828a

Browse files
committed
Replace calls to fig.show() with plt.show()
Some examples call `fig.show()` with the expectation that a matpltolib figure will be displayed on-screen. However, since `fig.show` does not manage the backed GUI mainloop this will seemingly fail. In most cases, it will be more convenient for end-users to rely on `plt.show` to display figures.
1 parent 05fbbb9 commit e98828a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cheatsheets.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
ax.plot(X, Y, color='green')\\
290290
\\
291291
fig.savefig(``figure.pdf'')\\
292-
fig.show() }
292+
plt.show() }
293293
\end{myboxed}
294294
\vspace{\fill}
295295

handout-beginner.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ \section*{\LARGE \rmfamily
9191
\begin{lstlisting}
9292
fig, ax = plt.subplots()
9393
ax.plot(X, Y)
94-
fig.show()
94+
plt.show()
9595
\end{lstlisting}
9696
%
9797
\fbox{4} \textbf{Observe} \medskip\\

0 commit comments

Comments
 (0)