O'Reilly logo

Python Data Analysis by Ivan Idris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Useful Functions

This appendix lists useful functions organized by packages for matplotlib, NumPy, pandas, scikit-learn, and SciPy.

matplotlib

The following are useful matplotlib functions:

  • matplotlib.pyplot.axis(*v, **kwargs): This is the method to get or set axis properties. For example, axis('off') turns off the axis lines and labels.
  • matplotlib.pyplot.figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=<class 'matplotlib.figure.Figure'>, **kwargs): This function creates a new figure.
  • matplotlib.pyplot.grid(b=None, which='major', axis='both', **kwargs): This function turns the plot grids on or off.
  • matplotlib.pyplot.hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required