Visualization UW CSE 160 Spring 2018.

Slides:



Advertisements
Similar presentations
In Documents. Using Graphics to Think Preparing the graphics first helps you get started and sets out the framework of your written product.
Advertisements

Visualization UW CSE 190p Summer BARE BONES VISUALIZATION IN PYTHON WITH MATPLOTLIB.
Chapter 5 USER INTERFACE Decision Support Systems For Business Intelligence.
Source: Tufte E. (2001) The Visual Display of Quantitiative Information. 2 nd Ed. Cheshire: Graphics Press Originally published in American Education,
Introduction to MATLAB MECH 300H Spring Starting of MATLAB.
Data Visualisation Adam Crymble Intro to Digital History.
Programming Batch Files Aim: To introduce the concept of Batch processing and programming techniques. Lesson Outcomes  The need for Batch Processing.
PYTHON PLOTTING CURVES CHAPTER 10_5 FROM THINK PYTHON HOW TO THINK LIKE A COMPUTER SCIENTIST.
Algebra 2: Section 7.4 Inverse Functions.
2-1 Relations and Functions
IMAGE PROCESSING LIBRARY (PIL) This is a package that you can import into python and it has quite a few methods that you can process image files with.
School of Computer Science The craft of Information Visualization NCRM Research Methods Festival 2008 Jonathan C. Roberts School of Computer Science Bangor.
Function Lab Chapter 9. Does the table represent a function? YES or NO XY Remember: The “X”s are all different if it is a function Remember:
More Data Abstraction UW CSE 190p Summer Recap of the Design Exercise You were asked to design a module – a set of related functions. Some of these.
Data Abstraction UW CSE 140 Winter What is a program? – A sequence of instructions to achieve some particular purpose What is a library? – A collection.
Basic File Input and Output Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
Information Visualization Digital Humanities Workshop Brad Hemminger.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
Visualization UW CSE 140 Winter matplotlib Strives to emulate MATLAB – Pro: familiar to MATLAB users – Pro: powerful – Con: not the best design.
EML 2023 Computer Aided Graphics and Design Carl Crane MAE-B
COSC 235: Programming and Problem Solving Ch. 4 or… Everything is an Object Instructor: Dr. X.
Introduction to Programming Workshop 6 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Data Visualization Lecture 8. Data Visualization Historically, data visualization served to make hidden relationships comprehensible or complex ones visible.
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
MAPS. Dr. John Snow’s Cholera Map of London
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
1-d Arrays & Plotting.
Visual Analytics Detect the Expected Discover the Unexpected A Tutorial for Middle School and High School Teachers Module 1- What is Visual Analytics?
Unit 3 Section : Regression Lines on the TI  Step 1: Enter the scatter plot data into L1 and L2  Step 2 : Plot your scatter plot  Remember.
Matplotlib SANTHOSH Boggarapu.
Python & NetworkX Youn-Hee Han
Python Lab Matplotlib - I Proteomics Informatics, Spring 2014 Week 9 25 th Mar, 2014
Data Abstraction UW CSE 160 Spring What is a program? – A sequence of instructions to achieve some particular purpose What is a library? – A collection.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Using Python to Retrieve and Visualize Data (part 1 of 2) Jon Goodall Hydroinformatics Fall 2014 This work was funded by National Science Foundation Grants.
Holt McDougal Algebra 1 Relations and Functions GSE Algebra 1 Unit 2B D1 Identifying Functions Essential Questions How can I identify functions from various.
Introduction to python
Objective I can solve systems of equations using elimination with addition and subtraction.
IPYTHON AND MATPLOTLIB Python for computational science
Florence Nightingale’s graph
Design Exercise UW CSE 140 Winter 2014.
PH2150 Scientific Computing Skills
Data Abstraction UW CSE 160 Winter 2017.
Data Abstraction UW CSE 160 Winter 2016.
Tables and Relations Review
Nicholas Shahan Spring 2016
Visualization UW CSE 160 Winter 2016.
Python plotting curves chapter 10_5
Ruth Anderson UW CSE 160 Winter 2017
Click on: Slide show – from beginning
Visualization UW CSE 160 Winter 2017.
Graphing Equations TeacherTwins©2014.
X and Y's of Scientific Method
Matplotlib.
Ruth Anderson UW CSE 160 Spring 2018
Epidemiology: the branch of medicine that deals with the incidence, distribution, and possible control of diseases and other factors relating to health.
Notes on pyplot Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction.
Ruth Anderson UW CSE 160 Winter 2016
Tables and Relations Review
Relations and Functions.
Ruth Anderson CSE 160 University of Washington
Tables and Relations Review
Visualization UW CSE 160 Spring 2015.
CONSORT and beyond The Journal of Thoracic and Cardiovascular Surgery
Nate Brunelle Today: Functions again, Scope
Matplotlib and Pandas
Programming with data Lab 3
UW CSE 190p Section 7/19, Summer 2012 Dun-Yu Hsiao.
UW CSE 190p Section 6/28, Summer 2012 Dun-Yu Hsiao.
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Presentation transcript:

Visualization UW CSE 160 Spring 2018

matplotlib Strives to emulate MATLAB One important function for HW6: Pro: familiar to MATLAB users Pro: powerful Con: not the best design for a plotting library One important function for HW6: plot(xvalues, yvalues)

Plot import matplotlib.pyplot as plt xs = [1,2,3,4,5] # ys = [x**2 for x in xs] ys = [] for x in xs: ys.append(x**2) plt.plot(xs, ys) plt.show() no return value? Has a side effect on the figure (like “print” statement)

import matplotlib. pyplot as plt xs = range(-100,110,10) x2 = [x import matplotlib.pyplot as plt xs = range(-100,110,10) x2 = [x**2 for x in xs] negx2 = [-x**2 for x in xs] plt.plot(xs, x2) plt.plot(xs, negx2) plt.xlabel("x") plt.ylabel("y") plt.ylim(-2000, 2000) plt.axhline(0) # horiz line plt.axvline(0) # vert line plt.savefig("quad.png") plt.show() Incrementally modify the figure. Save your figure to a file Show it on the screen

We can group these options into functions as usual, but remember that they are operating on a global, hidden variable (the figure)

Visualization: Pros and Cons Visualizations can Mislead: https://venngage.com/blog/misleading-graphs/ Visualizations can be powerful: John Snow’s Famous Cholera Map

1854 London cholera epidemic Map by Dr. John Snow

Napoleon’s Russian Campaign of 1812 Graphic by Charles Joseph Minard