MATH0011 video 20 - matplotlib.pyplot

Опубликовано: 14 Май 2026
на канале: Matthew Towers
145
2

Basic plotting using the pyplot interface to matplotlib. How to use matplotlib.pyplot.plot to plot points and optionally join them with lines. How to make graphs of functions y = f(x) using NumPy's linspace and a list comprehension together with plot. Multiple plots on the same axes. Customising plots by changing line style and colour, adding axis labels and a title, and adding grid lines. Default arguments for Python functions, how to override the defaults, how to create your own functions with defaults. Drawing histograms with matplotlib.pyplot.hist, how to specify bins, example of rolling a six-sided die many times and plotting a histogram of the results .