Skip to main content

Matplotlib to Plotly Converter

Project description

The Nutshell

Use this package to render matplotlib figures in plotly. Simply stick a one-liner in after you’ve created your mpl figure:

fig_to_plotly(fig, username, api_key)

That will open up a new browser window with your mpl figure rendererd in plotly.


Plotly is an online collaborative data analysis and graphing tool. The matplotlylib package allows users to export matplotlib figures to plotly. Plotly figures are shared, tracked, and edited all online and the data is always accessible from the graph. The goal of this project is to offer users a simple interface to send a matplotlib figure to plotly from Python:

fig_to_plotly(fig, username, api_key)

That’s it. Find out more, sign up, and start sharing by visiting us at

Install via pip

Assuming you have already installed pip, you can simply enter the following in a terminal program:

$ pip install matplotlylib

Install via make

A makefile is included on the GitHub repo for this project that is not part of the PyPI distribution. If you want to make changes to this code, you’ll probably want to go this route.

To get started you need to grab a copy of the matplotlylib repo. The makefile included in this is all you need to get setup. Just do the following:

$ make build
$ make install

The first instruction will grab mplexporter and move it into the matplotlylib directory.

The second instruction will install the matplotlylib package, which now has mplexporter built into it.

IPython notebook

The project page has an extensive IPython notebook with example usage.

Or, have a look at our plotly profile, where you can open and edit all of the examples. If the NB is loading slowing, checkout our static site hosted on GitHub page at:


The matplotlylib package requires the matplotlib and plotly Python packages.

This package is based on the mplexporter framework for crawling and exporting matplotlib images. mplexporter is bundled with the source distribution via git submodule.

Created by: Plotly, @plotlygraphs,

License: MIT

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matplotlylib-0.1.0.tar.gz (457.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page