Cheat Sheet on Graphs

Links: notebook, html, PDF, python, slides, GitHub

Links, pointers on many plotting libraries.

from jyquickhelper import add_notebook_menu
add_notebook_menu()

Notebook start

To include graphs in a notebook, many modules require to execute a line before it is imported.

matplotlib

%matplotlib inline

Changing style

import matplotlib.pyplot as plt
plt.style.use('ggplot')

Available styles:

plt.style.available
['bmh',
 'classic',
 'dark_background',
 'fast',
 'fivethirtyeight',
 'ggplot',
 'grayscale',
 'seaborn-bright',
 'seaborn-colorblind',
 'seaborn-dark-palette',
 'seaborn-dark',
 'seaborn-darkgrid',
 'seaborn-deep',
 'seaborn-muted',
 'seaborn-notebook',
 'seaborn-paper',
 'seaborn-pastel',
 'seaborn-poster',
 'seaborn-talk',
 'seaborn-ticks',
 'seaborn-white',
 'seaborn-whitegrid',
 'seaborn',
 'Solarize_Light2',
 'tableau-colorblind10',
 '_classic_test']

bokeh

import bokeh.plotting as bplt
bplt.output_notebook()
Loading BokehJS ...

pyecharts

import pyecharts

Change style

Only with matplotlib

import matplotlib.pyplot as plt
plt.style.use('ggplot')

If you want to draw a…

Basic graph as images

Basic graphs as javascript

Animated graphs

Maps

Statistical graphs

Networks

More

Notebooks and Python