Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 1.79 KB

PITCHME.md

File metadata and controls

78 lines (52 loc) · 1.79 KB

Python Visualization Workshop

Northwestern IT Research Computing Services
July 9, 2018

Jim Griffin


Outline

  • Intro Slides
    • matplotlib organization
    • plot anatomy
    • types of plots
  • Simple examples
  • Styling plot elements
  • Plotting with Pandas dataframes
  • Pretty plots (Seaborn, colorpalettes)

Matplotlib.pyplot Objects

  • Figure
  • Axes


Preferred (Object Oriented) Approach:

  1. Create figure and axis objects
  2. Use figure and axis methods to modify visual elements

Matplotlib Object Oriented Syntax

  import matplotlib.pyplot as plt

  fig, ax = plt.subplots()

  ax.plot(x,y, ***kwargs)
  ax.set_xlabel('x label')

  fig.savefig('path/to/file.png')

@[1](Matplotlib import statement) @[3](Create figure and axis objects) @[5](Axes objects have methods for most common plot types
(i.e. line, scatter, bar, pie)) @[6](Axes methods also control labels, titles, limits, tick properties) @[8](Figure methods control axes layout and saving)

Detailed plot anatomy


Common Plot Types

add something


Stack Overflow Is Better At Programming Than Us

The most valuable thing you can learn in this class is what things are called and how they are organized so that you can google:
"site:stackoverflow.com matplotlib THING"


Additional Resources: