This slide is part of Python Data Visualization series event held by AIC x PyLadies TW.
Part 2: Python plot packages, e.g., matplotlib, seaborn, plotly, bokeh
18. import matplotlib.pyplot as plt
● Background: from matlab to matplotlib
● Structure layers
○ backend layer
○ artist layer
○ scripting layer
■ pyplot, pylab
Matplotlib
19. Anaconda Python Environment:
● Good for data analysis tasks
● Virtual environment by
Anaconda
○ conda create -n <yourenvname>
python=3.4 anaconda
Environment
Jupyter Notebook:
● Good for demo, presentation,
trial and error...
● Magic line in jupyter notebook:
○ %matplotlib inline
20. Preferable Functions
● Goals:
○ Generate charts EASILY
○ Make some adjustments
● Aspects:
○ Chart types
○ Customizable elements
○ Grids / subplots
47. 1. Gallery
a. Chart types
https://plot.ly/python/
b. Customizable elements
https://images.plot.ly/plotly-documentation/images/python_cheat_sheet
.pdf
c. Matrix /grid
https://plot.ly/python/#multiple-axes-subplots-and-insets
2. Implementation
a. Offline mode: https://plot.ly/python/offline/
b. 3D scatter:
https://medium.com/@ichitsai/vis-plot-ly-offline-python-%E8%B3%87%E
6%96%99%E8%A6%96%E8%A6%BA%E5%8C%96-f4b540c130f8
3. Pros and cons
Plotly