Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
About
People
Publications
Teaching
Resources
Research Blog
Wiki Functions
Recent changes
Help
Licensing
Page
Discussion
Edit
View history
Editing
Matplotlib
(section)
From CommunityData
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Visualizing data with Matplotlib == In this session, we will explore how to produce clear, informative charts, graphs, and plots with [http://matplotlib.org/ Matplotlib], the most popular toolkit for scientific data visualization in Python. We'll start with the data-set created [[Community_Data_Science_Workshops_(Fall_2015)/Day_3_Lecture|this morning]] containing information about edits to the Harry Potter Wikipedia article. We will then proceed to visualize different aspects of data from the [[Community_Data_Science_Workshops_(Fall_2015)/Day_2_Projects/Socrata|Socrata web API]]. === Inspiration === * [https://flowingdata.com/ Flowing Data] * [http://www-01.ibm.com/software/analytics/many-eyes/ Many Eyes] * [http://www.edwardtufte.com/tufte/ Edward Tufte] * [http://www.visualizing.org/ visualizing.org] * [http://idl.cs.washington.edu/ UW Interactive Data Lab] === Goals === * Get set up to make graphs with Matplotlib * Learn the basics of the Matplotlib API and workflow * Practice reading the Matplotlib documentation * Build a plotting program step by step * Learn simple ways to distill the essence of a large data set * Explore the art of visualizing data * Exercise your creativity by making your own visualization # First plot: <tt>001-hello-plot.py</tt> # Subplots: <tt>002-subplots.py</tt> # Let's do something more interesting: <tt>003-plot-timeseries.py</tt> # Visit the [http://matplotlib.org/gallery.html Matplotlib gallery]. # Make another kind of plot: <tt>004-plot-histogram.py</tt> # Dive deeper into web APIs: <tt>005-traffic-timeseries.py</tt> # Play around with any/all the data you've seen! You can find some more examples in the <tt>wikibios</tt> folder. === References === * [http://matplotlib.org/api/pyplot_summary.html matplotlib API reference] * [http://matplotlib.org/examples/index.html matplotlib Examples] (many, with source) * Other plotting resources ** [http://web.stanford.edu/~mwaskom/software/seaborn/ Seaborn]: fancy matplotlib-based visualizations ** [http://ggplot.yhathq.com/ ggplot]: port of the R language's ggplot2 library to python ** [http://d3js.org/ D3.js]: interactive data visualization for the browser (javascript) === Example topics to cover in Lecture === * line charts * histograms * binning * scatter plots * heat maps * axis labeling * legends [[File:Wikipedia.png|right|250px]] [[Category:CDSW]]
Summary:
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see
CommunityData:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information