In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The
plot function included in
matplotlib can display our particles as points on a Cartesian grid and the
FuncAnimation class can animate the evolution of our particles over time."
A block of code is set as follows:
from matplotlib import pyplot as plt from matplotlib import animation def visualize(simulator): X = [p.x for p in simulator.particles] Y = [p.y for p in simulator.particles]