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

Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
Sérgio Sacani
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
Lokesh Kothari
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
gindu3009
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
Sérgio Sacani
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 

Recently uploaded (20)

TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 

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