320
Chapter 15
At we use
range()
to generate a list of numbers equal to the number
of points in the walk. Then we store them in the list
point_numbers
, which
we’ll use to set the color of each point in the walk.
We pass
point_numbers
to the
c
argument, use the
Blues
colormap, and then pass
edgecolors='none'
to get rid of the black outline around each point.
The result is a plot of
the walk that varies from light to dark blue along a gradient, as shown in
Figure 1510.
Figure 15-10: A random walk colored with the Blues colormap
Do'stlaringiz bilan baham: