SlideShare a Scribd company logo
1 of 12
Download to read offline
Scientific
Plotting
in Python
Jack Parmer
CEO, Plotly
BS Engineering Physics
Developed over
10+ years.
Cornerstone of scientific
graphing in Python.
Open-source.
New Expectations
for Scientific Graphics
● Interactive
● Shareable on the Web
● Data is accessible
● Informed aesthetics
Technology
Roadblock
Matplotlib generates raster images.
● Not interactive
● Data is lost from graph
● No free anti-aliasing or fonts from
browser technology
New Project - mplexporter
Extract matplotlib “graph DNA” to a universal JSON format, that anyone can read.
IPython Notebook:
http://nbviewer.ipython.org/github/plotly/IPython-plotly/blob/master/See%20more/Plotly%20and%20mpld3.ipynb
GitHub Repo:
https://github.com/mpld3/matplotlylib
mplexporter
mplexport Improves Data Liquidity
x: [ 10.0, 20.0, 30.0 ]
y: [ 100.0, 200.0, 300.0 ]
Data is sent to
matplotlib figure.
A matplotlib figure
object.
Extract figure data
and layout with
mplexporter.
Data can be reused
for a different
purpose.
Goal is to make data transfer bidirectional - Data can be put in *and* taken out of figures.
Plans to expand Matplotlib so that all figure objects include and expose their data.
SVG and Web Graphics
are Incredible
Several projects are leveraging rich web
graphics technology for plotting with Python
● mpld3 (Using SVG / d3.js)
● http://mpld3.github.io/
● Plotly (Using SVG / d3.js)
● http://plot.ly/python/
● Bokeh (Using HTML5 Canvas)
● http://bokeh.pydata.org/
SVG and Web Graphics
are Interactive
Using JavaScript, scientific figures rendered
with Python can have interactive elements.
Zoom, pan, hover...
http://nbviewer.ipython.org/gist/jackparmer/7729584
Aesthetic Layering for
Matplotlib
Several projects work with Matplotlib to
improve its default styling, without using web
graphics technology (SVG or Canvas).
● prettyplotlib
● http://olgabot.github.io/prettyplotlib/
● Seaborn
● http://www.stanford.
edu/~mwaskom/software/seaborn/
prettyplotlib
http://olgabot.github.io/prettyplotlib/
prettyplotlib
Sharing Scientific
Plots on the Web
Plotly syncs graphs and data to its cloud for free
with its Python API.
Each graph is given a unique URL
https://plot.ly/~jackp/1544
Graphs are always kept with their original data.
fig1 = plt.figure()
x = np.arange(0,1.0,0.01)
y1 = np.sin(2*np.pi*x)
y2 = np.cos(4*np.pi*x)
ax = fig1.add_subplot(111)
ax.plot(x, y1, 'b--',
label='sin')
ax.plot(x, y2, 'ro',
label='cos')
ax.set_title("It's a Sign")
ax.set_xlabel('time')
ax.set_ylabel('amplitude')
fig_to_plotly(fig1, 
plotly_username, 
plotly_api_key, 
notebook=True)
https://plot.ly/~jackp/1544
Questions?
jack@plot.ly
http://nbviewer.ipython.org/gist/jackparmer/7729584

More Related Content

What's hot

GR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GRGR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GR
Josef Heinen
 
How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...
Eugene Kirpichov
 
Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
Just-In-Time GPU Compilation for Interpreted Languages with Partial EvaluationJust-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
Juan Fumero
 

What's hot (20)

R for Python Users
R for Python UsersR for Python Users
R for Python Users
 
Comparing R vs. Python for data visualization
Comparing R vs. Python for data visualizationComparing R vs. Python for data visualization
Comparing R vs. Python for data visualization
 
GR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GRGR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GR
 
RDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation PruningRDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation Pruning
 
Optimal Tooling for Machine Learning and AI
Optimal Tooling for Machine Learning and AIOptimal Tooling for Machine Learning and AI
Optimal Tooling for Machine Learning and AI
 
Getting more out of Matplotlib with GR
Getting more out of Matplotlib with GRGetting more out of Matplotlib with GR
Getting more out of Matplotlib with GR
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
Pycon tw 2013
Pycon tw 2013Pycon tw 2013
Pycon tw 2013
 
How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...
 
Faster Python
Faster PythonFaster Python
Faster Python
 
Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
Just-In-Time GPU Compilation for Interpreted Languages with Partial EvaluationJust-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation
 
NumPy Roadmap presentation at NumFOCUS Forum
NumPy Roadmap presentation at NumFOCUS ForumNumPy Roadmap presentation at NumFOCUS Forum
NumPy Roadmap presentation at NumFOCUS Forum
 
An Evaluation of Models for Runtime Approximation in Link Discovery
An Evaluation of Models for Runtime Approximation in Link DiscoveryAn Evaluation of Models for Runtime Approximation in Link Discovery
An Evaluation of Models for Runtime Approximation in Link Discovery
 
Data science in ruby, is it possible? is it fast? should we use it?
Data science in ruby, is it possible? is it fast? should we use it?Data science in ruby, is it possible? is it fast? should we use it?
Data science in ruby, is it possible? is it fast? should we use it?
 
What's new in AI in 2020 (very short)
What's new in AI in 2020 (very short)What's new in AI in 2020 (very short)
What's new in AI in 2020 (very short)
 
Deep Learning meetup
Deep Learning meetupDeep Learning meetup
Deep Learning meetup
 
Tips and Tricks for Data Visualization in Python
Tips and Tricks for Data Visualization in PythonTips and Tricks for Data Visualization in Python
Tips and Tricks for Data Visualization in Python
 
La R Users Group Survey Of R Graphics
La R Users Group Survey Of R GraphicsLa R Users Group Survey Of R Graphics
La R Users Group Survey Of R Graphics
 
Hubba Deep Learning
Hubba Deep LearningHubba Deep Learning
Hubba Deep Learning
 

Similar to Scientific Plotting in Python

Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
inovex GmbH
 

Similar to Scientific Plotting in Python (20)

Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in Python
 
Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib. Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib.
 
Python Pyplot Class XII
Python Pyplot Class XIIPython Pyplot Class XII
Python Pyplot Class XII
 
APPLICATION OF PYTHON IN GEOSCIENCE
APPLICATION OF  PYTHON IN GEOSCIENCEAPPLICATION OF  PYTHON IN GEOSCIENCE
APPLICATION OF PYTHON IN GEOSCIENCE
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
 
High scalable applications with Python
High scalable applications with PythonHigh scalable applications with Python
High scalable applications with Python
 
Python webinar 4th june
Python webinar 4th junePython webinar 4th june
Python webinar 4th june
 
Pyconmini Hiroshima 2018
Pyconmini Hiroshima 2018Pyconmini Hiroshima 2018
Pyconmini Hiroshima 2018
 
Python for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptxPython for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptx
 
Copy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdfCopy of Copy of Untitled presentation (1).pdf
Copy of Copy of Untitled presentation (1).pdf
 
Portfolio
PortfolioPortfolio
Portfolio
 
Samsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of PythonSamsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of Python
 
Python on Science ? Yes, We can.
Python on Science ?   Yes, We can.Python on Science ?   Yes, We can.
Python on Science ? Yes, We can.
 
Luigi Presentation at OSCON 2013
Luigi Presentation at OSCON 2013Luigi Presentation at OSCON 2013
Luigi Presentation at OSCON 2013
 
Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017
Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017
Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017
 
Overview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis ToolsOverview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis Tools
 
Scaling graph investigations with Math, GPUs, & Experts
Scaling graph investigations with Math, GPUs, & ExpertsScaling graph investigations with Math, GPUs, & Experts
Scaling graph investigations with Math, GPUs, & Experts
 

Recently uploaded

LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
Cherry
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
Cherry
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
Scintica Instrumentation
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
Cherry
 

Recently uploaded (20)

Efficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence accelerationEfficient spin-up of Earth System Models usingsequence acceleration
Efficient spin-up of Earth System Models usingsequence acceleration
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNA
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Site specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdfSite specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdf
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 

Scientific Plotting in Python

  • 1. Scientific Plotting in Python Jack Parmer CEO, Plotly BS Engineering Physics
  • 2. Developed over 10+ years. Cornerstone of scientific graphing in Python. Open-source.
  • 3. New Expectations for Scientific Graphics ● Interactive ● Shareable on the Web ● Data is accessible ● Informed aesthetics
  • 4. Technology Roadblock Matplotlib generates raster images. ● Not interactive ● Data is lost from graph ● No free anti-aliasing or fonts from browser technology
  • 5. New Project - mplexporter Extract matplotlib “graph DNA” to a universal JSON format, that anyone can read. IPython Notebook: http://nbviewer.ipython.org/github/plotly/IPython-plotly/blob/master/See%20more/Plotly%20and%20mpld3.ipynb GitHub Repo: https://github.com/mpld3/matplotlylib mplexporter
  • 6. mplexport Improves Data Liquidity x: [ 10.0, 20.0, 30.0 ] y: [ 100.0, 200.0, 300.0 ] Data is sent to matplotlib figure. A matplotlib figure object. Extract figure data and layout with mplexporter. Data can be reused for a different purpose. Goal is to make data transfer bidirectional - Data can be put in *and* taken out of figures. Plans to expand Matplotlib so that all figure objects include and expose their data.
  • 7. SVG and Web Graphics are Incredible Several projects are leveraging rich web graphics technology for plotting with Python ● mpld3 (Using SVG / d3.js) ● http://mpld3.github.io/ ● Plotly (Using SVG / d3.js) ● http://plot.ly/python/ ● Bokeh (Using HTML5 Canvas) ● http://bokeh.pydata.org/
  • 8. SVG and Web Graphics are Interactive Using JavaScript, scientific figures rendered with Python can have interactive elements. Zoom, pan, hover... http://nbviewer.ipython.org/gist/jackparmer/7729584
  • 9. Aesthetic Layering for Matplotlib Several projects work with Matplotlib to improve its default styling, without using web graphics technology (SVG or Canvas). ● prettyplotlib ● http://olgabot.github.io/prettyplotlib/ ● Seaborn ● http://www.stanford. edu/~mwaskom/software/seaborn/
  • 11. Sharing Scientific Plots on the Web Plotly syncs graphs and data to its cloud for free with its Python API. Each graph is given a unique URL https://plot.ly/~jackp/1544 Graphs are always kept with their original data. fig1 = plt.figure() x = np.arange(0,1.0,0.01) y1 = np.sin(2*np.pi*x) y2 = np.cos(4*np.pi*x) ax = fig1.add_subplot(111) ax.plot(x, y1, 'b--', label='sin') ax.plot(x, y2, 'ro', label='cos') ax.set_title("It's a Sign") ax.set_xlabel('time') ax.set_ylabel('amplitude') fig_to_plotly(fig1, plotly_username, plotly_api_key, notebook=True) https://plot.ly/~jackp/1544