Show Sidebar Hide Sidebar

Plotly Matplotlib Library

Publish your Matplotlib figures to the web with one line of code! Examples of how to make line plots, scatter plots, area charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, multiple-axes, polar charts and bubble charts.

Instructions on how to install Plotly's Python package can be found on the Plotly for Python getting started page.
Instructions on how to install matplotlib can be found at

import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import plotly.plotly as py

py.sign_in('DemoAccount', 'lr1c37zw81')

n = 50
x, y, z, s, ew = np.random.rand(5, n)
c, ec = np.random.rand(2, n, 4)
area_scale, width_scale = 500, 5

fig, ax = plt.subplots()
sc = ax.scatter(x, y, c=c,

plot_url = py.plot_mpl(fig)


Documentation Examples

Basic Charts
Statistical and Seaborn-style Charts
Scientific Charts
3D Charts
Layout Options
Image Export & Retrieving Plots