0% found this document useful (0 votes)
125 views11 pages

Matplotlib Guide: Plotting Basics

The document introduces Matplotlib and provides an overview of its Figure and Axes classes. It discusses two approaches to using Matplotlib - via global functions or in an object-oriented way by obtaining Figures and Axes. The object-oriented approach is recommended for programmatic use. Key classes covered include Figure, which is the top-level container, and Axes, which is used for individual plots and subplots within a figure. Examples are provided for creating simple and multi-line plots using Matplotlib.

Uploaded by

JohnyMacaroni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views11 pages

Matplotlib Guide: Plotting Basics

The document introduces Matplotlib and provides an overview of its Figure and Axes classes. It discusses two approaches to using Matplotlib - via global functions or in an object-oriented way by obtaining Figures and Axes. The object-oriented approach is recommended for programmatic use. Key classes covered include Figure, which is the top-level container, and Axes, which is used for individual plots and subplots within a figure. Examples are provided for creating simple and multi-line plots using Matplotlib.

Uploaded by

JohnyMacaroni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Using Matplotlib as a Global State Machine
  • Preliminaries
  • Figure and Axes Classes
  • Application Programming Interface
  • Building Line Plots
  • Scatter Plots
  • Scatter Plots - More Options
  • Bar Plots
  • Advanced Plot Types
  • Plot Spines
  • Legends in Plots
  • Multiple Plots on a Canvas
  • Styling Plots
  • Cautionary Notes

Introductory Notes: Matplotlib

Preliminaries

Start by importing these Python modules


import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import [Link] as plt

Introducing the Figure and Axes classes


Which Application Programming Interface?
The Figure
The two worlds of Matplotlib Figure is the top-level container for everything on a
There are two broad ways of using matplotlib's pyplot: canvas. It was obtained from the global Figure factory.
fig = [Link](num=None, figsize=None,
1. The first (and most common) way is not pythonic. It dpi=None, facecolor=None,
relies on global functions to build and display a edgecolor=None)
global figure using matplotlib as a global state num – integer or string identifier of figure
machine. (This is easy for interactive use). if num exists, it is selected
if num is None, a new one is allocated
2. The second way is pythonic and object oriented and figsize – tuple of (width, height) in inches
it is the best approach for programmatic use: dpi – dots per inch
a. obtain an empty Figure from a global facecolor – background; edgecolor – border
factory, then build the plot using the
methods of the Figure and Axes classes; or Iterating over the open figures
b. obtain a populated Axes (and its Figure for i in plt.get_fignums():
container) using a plot method from the fig = [Link](i) # get the figure
pandas data analysis library, which you can print ([Link]) # do something
then pretty-up and save to file.
Close a figure
These notes focus on the 2a approach. For 2b, see the
pandas cheat sheet ([Link] First, let's [Link]([Link]) # close figure
look at using pyplot as a global state machine. [Link]() # close the current figure
[Link](i) # close figure numbered i
[Link](name) # close figure by str name
Using matplotlib as a global state machine [Link]('all') # close all figures

An Axes or Subplot (a subclass of Axes)


1. Get data – we will fake up a monthly time series
An Axes is a container class for a specific plot. A figure
x = pd.period_range('1980-01-01', periods=450,
may contain many Axes and/or Subplots. Subplots are
freq='M').to_timestamp().to_pydatetime()
y = [Link](len(x)).cumsum()
laid out in a grid within the Figure. Axes can be placed
anywhere on the Figure. There are a number of
methods that yield an Axes, including:
2. Plot the data
ax = fig.add_subplot(2,2,1) # row-col-num
[Link](x, y, label='FDI')
ax = fig.add_axes([0.1,0.1,0.8,0.8])
3. Add your labels and pretty-up the plot
All at once
[Link]().set_size_inches(8, 3)
[Link]('Fake Data Index') Use the subplots factory to get a Figure and Axes.
[Link]('Date') fig, ax = [Link]()
[Link]('Index') fig,(ax1,ax2,ax3) = [Link](nrows=3,
[Link](True) ncols=1, sharex=True, figsize=(8,4))
[Link](loc='best', framealpha=0.5,
prop={'size':'small'}) Iterating the Axes within a Figure
plt.tight_layout(pad=1)
for ax in fig.get_axes():
pass # do something
4. Save the figure and close it
[Link]('[Link]')
[Link]() From an Axes get its Figure
fig = [Link]
Alternatively, show the figure
With iPython, follow steps 1 to 3 above then Remove an Axes from a Figure
[Link]() # Note: also closes the figure [Link](ax)

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
1
Build a line plot with Matplotlib and raw (x, y) data Build a multi-line plot from raw data in matplotlib

A single line plot in matplotlib A multi-line plot with markers and line-styles
# --- fake up some data # --- select a style
x = [Link](0, 4*[Link], 800) [Link]('classic')
y = [Link](x)
# --- get the Figure and Axes all at once
# --- Select a style fig, ax = [Link](figsize=(8,6))
[Link]('classic')
# --- plot some lines
# --- get an empty Figure and add an Axes N = 8 # the number of lines we will plot
fig = [Link](figsize=(8,4)) styles = ['-', '--', '-.', ':']
ax = fig.add_subplot(1,1,1) # row-col-num markers = list('+ox^psDv')
x = [Link](0, 100, 20)
# --- line plot data on the Axes for i in range(N): # add line-by-line
[Link](x, y, 'b-', linewidth=2, y = x + x/5*i + i
label=r'$y=\sin(x)$') s = styles[i % len(styles)]
m = markers[i % len(markers)]
# --- add title and axis labels [Link](x, y,
ax.set_title('The Sine Wave') label='Line '+str(i+1)+' '+s+m,
ax.set_ylabel(r'$y$', fontsize=16) marker=m, linewidth=2, linestyle=s)
ax.set_xlabel(r'$x$', fontsize=16)
# --- add grid, legend, title and save
# --- change the default plot limits [Link](True)
ax.set_xlim((-0.05, 4*[Link] + 0.05,)) [Link](loc='best', prop={'size':'large'})
ax.set_ylim((-1.05, 1.05)) ax.set_title('A Simple Line Plot')
fig.tight_layout(pad=1)
# --- plot a legend in the best location [Link]('[Link]', dpi=125)
[Link](loc='best') [Link]('all')

# --- add grid – not in default classic style


[Link](True)

# --- improve the layout


fig.tight_layout(pad=1)

# --- save and close


[Link]('[Link]', dpi=125)
[Link]('all')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
2
Scatter plots – using matplotlib's [Link]()

A simple scatter plot


x = [Link](100)
y = x + [Link](100) + 10
[Link]('classic')
fig, ax = [Link](figsize=(8, 3))
[Link](x, y, alpha=0.5, color='orchid')
ax.set_title('Example Scatter Plot') Add a prediction interval for the regression line
[Link](True) from [Link]\
fig.tight_layout(pad=1) import wls_prediction_std
[Link]('[Link]', dpi=125) sdev, lower, upper =
wls_prediction_std(fitted,
exog=x_pred2, alpha=0.05)
ax.fill_between(x_pred, lower, upper,
color='#888888', alpha=0.1)
[Link]('[Link]', dpi=125)
[Link]('all')

Add a regression line (using statsmodels)


import [Link] as sm
x = sm.add_constant(x) # intercept
# Model: y ~ x + c
model = [Link](y, x)
fitted = [Link]()
x_pred = [Link]([Link](), [Link](), 50) Note: The confidence interval relates to the location of
x_pred2 = sm.add_constant(x_pred) the regression line. The predication interval relates to
y_pred = [Link](x_pred2) the location of data points around the regression line.
[Link](x_pred, y_pred, '-',
color='darkorchid', linewidth=2)
[Link]('[Link]', dpi=125) Quick scatter and regression plots using Seaborn

Use seaborn
import seaborn as sns

x = [Link](100)
y = x + [Link](100) + 10
df = DataFrame([x, y], index=['x', 'y']).T

g = [Link](x='x', y='y', data=df,


Add confidence bands for the regression line fit_reg=True)
y_hat = [Link](x) ax = [Link][0, 0]
y_err = y - y_hat ax.set_title('Title')
mean_x = x.T[1].mean() fig = [Link]
n = len(x) fig.set_size_inches(8, 3)
dof = n - fitted.df_model - 1 fig.tight_layout(pad=1)
from scipy import stats [Link]("[Link]")
t = [Link](1-0.025, df=dof) # 2-tail [Link]('all')
s_err = [Link]([Link](y_err, 2))
conf = t * [Link]((s_err/(n-2))*(1.0/n +
([Link]((x_pred-mean_x),2) /
(([Link]([Link](x_pred,2))) -
n*([Link](mean_x,2))))))
upper = y_pred + abs(conf)
lower = y_pred - abs(conf)
ax.fill_between(x_pred, lower, upper,
color='#888888', alpha=0.3)
[Link]('[Link]', dpi=125)

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
3
Changing the marker symbol
Scatter plots – more options
# --- get the Figure and Axes classes
[Link]('classic')
Changing the marker size and colour fig, ax = [Link](figsize=(8,8))
# --- import a colour map
import [Link] as cm # --- add scatter plots
markers = list('ov^<>12348sphHdD+x*|_')
# --- get some data N = len(markers)
N = 100 for i, m in enumerate(markers):
x = [Link](N) x = [Link](N)
y = [Link](N) y = [Link](i+1, N)
size = (([Link](N) + 1) * 8) ** 2 [Link](x, y, marker=m, label=m,
colour = [Link](N) s=50, c='cornflowerblue')

# --- plot # --- tidy up and save to file


[Link]('classic') ax.set_xlim((-1,N))
fig, ax = [Link](figsize=(8, 6)) ax.set_ylim((0,len(markers)+1))
l = [Link](x, y, s=size, c=colour, [Link](loc='upper left', ncol=3,
cmap=[Link]) # choose a colormap prop={'size':'xx-large'},
shadow=True, title='Marker Legend')
# --- attach the colour bar ax.get_legend().get_title().set_color("red")
clb = [Link](l, ax.set_title('Markers ' +
orientation='horizontal') '(with an oversized legend)')
[Link].set_title('Colour bar title') fig.tight_layout(pad=1);
[Link]('[Link]', dpi=125)
# --- do the size legend by hand ... [Link]('all')
sz = [[Link](), [Link](), [Link]()]
handles = [[Link]([],[],s=sz[i]) for i in
range(len(sz))]
labels = [str(int(round(x, 0))) for x in sz]
[Link](handles=handles, labels=labels,
loc='upper right', scatterpoints=1,
title='Size')

# --- grid, plot-limits, title and save


[Link](True)

ax.set_xlim((-0.05, 1.05))
ax.set_ylim((-0.05, 1.05))

ax.set_title('Dramatic Scatter Plot')

fig.tight_layout(pad=1);
[Link]('[Link]', dpi=125)
[Link]('all')
Note: there are many colormaps to choose from.

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
4
Bar plots – using [Link]() and [Link]()

A simple bar chart


# --- get the data
N = 5
labels = list('ABCDEFGHIJKLM'[0:N])
data = [Link](range(N)) + [Link](N)

# --- plot the data


[Link]('classic')
fig, ax = [Link](figsize=(8, 3))
width = 0.8
tickLocations = [Link](N)
[Link](tickLocations, data, width, Stacked bar
color='wheat', edgecolor='#8B7E66', # --- get some data
linewidth=4.0, align='center') alphas = [Link]( [23, 44, 52, 32] )
betas = [Link]( [38, 49, 32, 61] )
# --- pretty-up the plot labels = ['Sydney', 'Melb', 'Canb', 'Bris']
ax.set_xticks(ticks= tickLocations)
ax.set_xticklabels(labels) # --- the plot
ax.set_xlim(min(tickLocations)-0.6, [Link]('classic')
max(tickLocations)+0.6) fig, ax = [Link](figsize=(8, 5))
ax.set_yticks(range(N)[1:]) width = 0.8
ax.set_ylim((0,N)) xlocations = [Link](range(len(alphas)))
[Link](True) [Link](xlocations, alphas, width,
label='alpha', color='tan',
# --- title and save align='center')
ax.set_title("Bar Plot w/ Oversized Edges") [Link](xlocations, betas, width,
fig.tight_layout(pad=1) label='beta', color='wheat',
[Link]('[Link]', dpi=125) align='center',
[Link]('all') bottom=alphas)

# --- pretty-up and save


ax.set_xticks(ticks=xlocations)
ax.set_xticklabels(labels)
[Link](True)
[Link](loc='best', prop={'size':'small'})
ax.set_title("Stacked Nonsense")
fig.tight_layout(pad=1)
[Link]('[Link]', dpi=125)
[Link]('all')
Side by side bar chart
# --- get the data
before = [Link]([10, 11, 9, 12])
after = [Link]([11, 12, 8, 17])
labels=['Group '+x for x in list('ABCD')]
# --- the plot – left then right
fig, ax = [Link](figsize=(8, 5))
width = 0.4 # bar width
xlocs = [Link](len(before))
[Link](xlocs-width, before, width,
color='cornflowerblue', label='Males')
[Link](xlocs, after, width,
color='hotpink', label='Females')
# --- labels, grids and title, then save
ax.set_xticks(ticks=range(len(before)))
ax.set_xticklabels(labels)
[Link](True)
[Link](loc='best')
ax.set_ylabel('Mean Group Result')
ax.set_title('Group Results by Gender')
fig.tight_layout(pad=1)
[Link]('[Link]', dpi=125)
[Link]('all')
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
5
Horizontal bar charts
Polar – using [Link]()
# --- the data
labels = ['Males', 'Females', 'Persons']
data = [6.3, 7.2, 6.8] Polar coordinates
y = [Link](len(data)) # --- theta
theta = [Link](-[Link], [Link], 800)
# --- plot
width = 0.8 # --- get us a Figure
fig, ax = [Link](figsize=(8, 3.5)) fig = [Link](figsize=(8,4))
[Link](y, data, width, color='wheat',
align='center') # --- left hand plot
ax = fig.add_subplot(1,2,1, polar=True)
# --- tidy-up and save r = 3 + [Link](5*theta)
ax.set_yticks(y) [Link](theta, r)
ax.set_yticklabels(labels) ax.set_yticks([1,2,3,4])
[Link](True)
ax.set_ylabel('Gender'); # --- right hand plot
ax.set_xlabel('Rate (Percent)') ax = fig.add_subplot(1,2,2, polar=True)
ax.set_title("Horizontal Nonsense") r = ([Link](theta)) - ([Link](10*theta))
fig.tight_layout(pad=1) [Link](theta, r, color='green')
[Link]('[Link]', dpi=125) ax.set_yticks([1,2])
[Link]('all')
# --- title, explanatory text and save
[Link]('Polar Coordinates')
[Link](x=0.24, y=0.05,
s=r'$r = 3 + \cos(5 \theta)$')
[Link](x=0.64, y=0.05,
s=r'$r = \sin(\theta) - \cos(10' +
r'\theta)$')
[Link]('[Link]', dpi=125)
[Link]('all')

Pie Chart – using [Link]()

As nice as pie
# --- get some data
data = [Link]([5,3,4,6])
labels = ['bats', 'cats', 'gnats', 'rats']
explode = (0, 0.1, 0, 0) # explode cats
colrs=['khaki', 'goldenrod', 'tan', 'wheat']

# --- the plot – then tidy-up and save


fig, ax = [Link](figsize=(8, 3.5))
[Link](data, explode=explode,
labels=labels, autopct='%1.1f%%',
startangle=270, colors=colrs)
[Link]('equal') # keep it a circle
ax.set_title("Title")
[Link]('[Link]', dpi=125)
[Link]('all')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
6
Spines in the middle
Plot spines
# --- the data
x = [Link](-[Link], [Link], 800)
Hiding the top and right spines y = [Link](x)
# --- the data
x = [Link](-[Link], [Link], 800) # --- the plot
y = [Link](x) fig, ax = [Link](figsize=(8, 4))

# --- the plot # --- the spines


fig, ax = [Link](figsize=(8, 4)) [Link](x, y, label='Sine')
[Link](x, y, label='Sine', color='red') [Link]['right'].set_color('none')
[Link]['top'].set_color('none')
# --- background and spines [Link].set_ticks_position('bottom')
ax.set_facecolor('#e5e5e5') [Link]['bottom'].set_position((
[Link]['right'].set_color('none') 'data',0))
[Link]['top'].set_color('none') [Link].set_ticks_position('left')
[Link]['left'].set_position( [Link]['left'].set_position((
('outward',10)) 'data',0))
[Link]['bottom'].set_position( [Link](b=True, which='both',
('outward',10)) color='#888888', linestyle='-',
[Link].set_ticks_position('bottom') linewidth=0.5)
[Link].set_ticks_position('left')
# --- tidy-up and save
# --- tidy up and save fig.tight_layout(pad=1)
# do the [Link]() after setting ticks [Link]('[Link]', dpi=125)
[Link](b=True, which='both', [Link]('all')
color='white', linestyle='-',
linewidth=1.5)
ax.set_axisbelow(True)
[Link](loc='best', frameon=False)
ax.set_title('The Sine Wave')
fig.tight_layout(pad=1)
[Link]('[Link]', dpi=125)
[Link]('all')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
7
Legend to the right of the plot
Legends
[Link]('classic')
fig, ax = [Link](figsize=(8, 4))
Legend within the plot
Use the 'loc' argument to place the legend x = [Link](N)
# --- get the empty Figure and Axes classes for j in range(5):
[Link]('classic') [Link](x, x*(j+1),
fig, ax = [Link](figsize=(8, 4)) label='Line '+str(j))

# --- plot something fig.tight_layout(pad=1)


N = 5 box = ax.get_position() # Shrink plot
x = [Link](N) ax.set_position([box.x0, box.y0,
for j in range(5): [Link] * 0.8, [Link]])
[Link](x, x*(j+1), label='Line'+str(j)) [Link](bbox_to_anchor=(1, 0.5),
loc='center left') # Put legend
# --- place the legend [Link]('[Link]', dpi=125)
[Link](loc='upper left') [Link]('all')

# --- save and close


fig.tight_layout(pad=1)
[Link]('[Link]', dpi=125)
[Link]('all')
Note: for legend placement, often loc='best' works
perfectly as expected.

Legend below the plot


[Link]('classic')
fig, ax = [Link](figsize=(8, 4))

N = 5
x = [Link](N)
for j in range(5):
Legend slightly outside of the plot [Link](x, x*(j+1),
[Link]('classic') label='Line '+str(j))
fig, ax = [Link](figsize=(8, 4))
N = 5 fig.tight_layout(pad=1)
x = [Link](N) box = ax.get_position()
for j in range(5): ax.set_position([box.x0,
[Link](x, x*(j+1), box.y0 + [Link] * 0.15,
label='Line '+str(j)) [Link], [Link] * 0.85])
[Link](bbox_to_anchor=(0.5, -0.075),
[Link](bbox_to_anchor=(1.05, 1.05)) loc='upper center', ncol=N)

fig.tight_layout(pad=1) [Link]('[Link]', dpi=125)


[Link]('[Link]', dpi=125) [Link]('all')
[Link]('all')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
8
Using GridSpec layouts (like list slicing)
Multiple plots on a canvas
import [Link] as gs
gs = [Link](3, 3) # nrows, ncols
Using Axes to place a plot within a plot fig = [Link](figsize=(8,3))
fig = [Link](figsize=(8,3)) [Link](x=0.01, y=0.01, s='Figure',
[Link](x=0.01, y=0.01, s='Figure', color='#888888', ha='left',
color='#888888', ha='left', va='bottom', fontsize=20)
va='bottom', fontsize=20) ax1 = fig.add_subplot(gs[0, :]) # row,col
[Link](x=0.2,y=0.2,s='0, :', color='b')
# --- Main Axes ax2 = fig.add_subplot(gs[1,:-1])
ax = fig.add_axes([0.1,0.1,0.8,0.8]) [Link](x=0.2,y=0.2,s='1, :-1', color='b')
[Link](x=0.01, y=0.01, s='Main Axes', ax3 = fig.add_subplot(gs[1:, -1])
color='red', ha='left', va='bottom', [Link](x=0.2,y=0.2, s='1:, -1', color='b')
fontsize=20) ax4 = fig.add_subplot(gs[-1,0])
ax.set_xticks([]); ax.set_yticks([]) [Link](x=0.2,y=0.2, s='-1, :0', color='b')
ax5 = fig.add_subplot(gs[-1,-2])
# --- Insert Axes [Link](x=0.2,y=0.2, s='-1,:-2', color='b')
ax= fig.add_axes([0.15,0.65,0.2,0.2]) for a in fig.get_axes():
[Link](x=0.01, y=0.01, s='Insert Axes', a.set_xticks([])
color='blue', ha='left', va='bottom', a.set_yticks([])
fontsize=20)
ax.set_xticks([]); ax.set_yticks([]) [Link]('GridSpec Layout')
[Link]('An Axes within an Axes') [Link]('[Link]', dpi=125)
[Link]('[Link]', dpi=125) [Link]('all')
[Link]('all')

Simple subplot grid layouts


fig = [Link](figsize=(8,3))
[Link](x=0.01, y=0.01, s='Figure',
color='#888888', ha='left',
va='bottom', fontsize=20)

for i in range(4):
# fig.add_subplot(nrows, ncols, num)
ax = fig.add_subplot(2, 2, i+1)
[Link](x=0.01, y=0.01,
s='Subplot 2 2 '+str(i+1),
color='red', ha='left',
va='bottom', fontsize=20)
ax.set_xticks([]); ax.set_yticks([])

ax.set_xticks([]); ax.set_yticks([])
[Link]('Subplots')
[Link]('[Link]', dpi=125)
[Link]('all')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
9
Style Roll your own style sheet

Matplotlib has many styles The Mark Graph Style Sheet


There are many different styles to choose from. [Link]: sans-serif
print([Link]) [Link]: normal
[Link]: normal
So let's choose one. [Link]: medium
[Link]('ggplot') [Link]: normal
[Link]-serif: Helvetica, Arial, Avant
Example line chart in three different styles Garde, sans-serif
# --- fake up some data [Link]: 14.0
x = pd.period_range('1980-01-01',
periods=410, freq='M') [Link]: 2.0
y = [Link](len(x)).cumsum() lines.solid_capstyle: butt
df = [Link](y, index=x,
columns=['Fake']) [Link]: true
[Link]: x-small
# --- plot data using different styles [Link]: 0.5
styles = ['classic', 'ggplot',
'fivethirtyeight'] axes.prop_cycle: cycler('color', ['ef5962',
for style in styles: '5a9dd2', '7dc16d', 'f9a560', '9d69aa',
'cd6f5a', 'd680b3', '737373'])
[Link](style)
ax = [Link]() [Link]: white
ax.set_title('Style: ' + style) [Link]: large # fontsize of the axes
ax.set_xlabel('X Axis') title
ax.set_ylabel('Y Axis') [Link]: medium # x and y label size
[Link]: 111111
fig = [Link]
fig.set_size_inches(8, 3) [Link]: true
[Link]: true
fig.tight_layout(pad=1)
[Link](0.99, 0.01, 'footnote', [Link]: white
ha='right', va='bottom', [Link]: 0.01
fontsize=9, fontstyle='italic',
color='#999999') [Link]: white
[Link]: 0.01
[Link]('f-'+style+'.png', dpi=125)
[Link]('all')
[Link]: path

[Link]: -
[Link]: 0.5
[Link]: e7e7e7

[Link]: 0
[Link]: 0
[Link]: small
[Link]: 333333
[Link]: 0
[Link]: 0
[Link]: small
[Link]: 333333

[Link]: 8, 4 # inches
[Link]: white

[Link]: black

[Link]: white
[Link]: white
Which is saved as "[Link]"

Using your own style sheet


[Link]('./[Link]')

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
10
Cautionary notes

This cheat sheet was cobbled together by bots roaming


the dark recesses of the Internet seeking ursine and
pythonic myths. There is no guarantee the narratives
were captured and transcribed accurately. You use
these notes at your own risk. You have been warned.

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter]
11

Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
1 
 
Introduct
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
2 
 
 
Build a
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
3 
 
 
Scatter
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
4 
 
 
Scatter
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
5 
 
 
Bar plo
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
6 
 
Horizonta
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
7 
 
 
Plot sp
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
8 
 
 
Legends
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
9 
 
 
Multipl
Version 19 May 2017 - [Draft – Mark Graph – mark dot the dot graph at gmail dot com – @Mark_Graph on twitter] 
10 
 
 
Style

You might also like