Skip to content

Commit

Permalink
cmap() can be called on array-like
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Jul 10, 2020
1 parent c7f47ae commit b3d9595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handout-tips.tex
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ \subsection*{\rmfamily Range of continuous colors}
\begin{lstlisting}[belowskip=-\baselineskip]
X = np.random.randn(1000, 4)
cmap = plt.get_cmap("Oranges")
colors = [cmap(i) for in in [.2,.4,.6,.8]]
colors = cmap([0.2, 0.4, 0.6, 0.8])

ax.hist(X, 2, histtype='bar', color=colors)
\end{lstlisting} &
Expand Down

0 comments on commit b3d9595

Please sign in to comment.