All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Offline matplotlib to Plotly figure conversion. Use
offline.plot_mplto convert and plot a matplotlib figure as a Plotly figure independently of IPython/Jupyter notebooks or useoffline.iplot_mplto convert and plot inside of IPython/Jupyter notebooks. Additionally, useoffline.enable_mpl_offlineto convert and plot all matplotlib figures as plotly figures inside an IPython/Jupyter notebook. See examples below:
An example independent of IPython/Jupyter notebooks:
from plotly.offline import init_notebook_mode, plot_mpl
import matplotlib.pyplot as plt
init_notebook_mode()
fig = plt.figure()
x = [10, 15, 20]
y = [100, 150, 200]
plt.plot(x, y, "o")
plot_mpl(fig)
An example inside of an IPython/Jupyter notebook:
from plotly.offline import init_notebook_mode, iplot_mpl
import matplotlib.pyplot as plt
init_notebook_mode()
fig = plt.figure()
x = [10, 15, 20]
y = [100, 150, 200]
plt.plot(x, y, "o")
iplot_mpl(fig)
An example of enabling all matplotlib figures to be converted to Plotly figures inside of an IPython/Jupyter notebook:
from plotly.offline import init_notebook_mode, enable_mpl_offline
import matplotlib.pyplot as plt
init_notebook_mode()
enable_mpl_offline()
fig = plt.figure()
x = [10, 15, 20, 25, 30]
y = [100, 250, 200, 150, 300]
plt.plot(x, y, "o")
fig
- Offline plotting now works outside of the IPython/Jupyter notebook. Here's an example:
from plotly.offline import plot
from plotly.graph_objs import Scatter
plot([Scatter(x=[1, 2, 3], y=[3, 1, 6])])
This command works entirely locally. It writes to a local HTML file with the necessary plotly.js code to render the graph. Your browser will open the file after you make the call.
The call signature is very similar to plotly.offline.iplot and plotly.plotly.plot and plotly.plotly.iplot, so you can basically use these commands interchangeably.
If you want to publish your graphs to the web, use plotly.plotly.plot, as in:
import plotly.plotly as py
from plotly.graph_objs import Scatter
py.plot([Scatter(x=[1, 2, 3], y=[5, 1, 6])])
This will upload the graph to your online plotly account.
- Check for
no_proxywhen determining if the streaming request should pass through a proxy in the chunked_requests submodule. Example:no_proxy='my_stream_url'andhttp_proxy=my.proxy.ip:1234, thenmy_stream_urlwill not get proxied. Previously it would.
Bug Fix: Previously, the "Export to plot.ly" link on
offline charts would export your figures to the
public plotly cloud, even if your config_file
(set with plotly.tools.set_config_file to the file
~/.plotly/.config) set plotly_domain to a plotly enterprise
URL like https://plotly.acme.com.
This is now fixed. Your graphs will be exported to your
plotly_domain if it is set.
- The FigureFactory can now create annotated heatmaps with
.create_annotated_heatmap. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_annotated_heatmap)
- The FigureFactory can now create tables with
.create_table.
import plotly.tools as tls
help(tls.FigureFactory.create_table)
- Previously, using plotly offline required a paid license.
No more:
plotly.jsis now shipped inside this package to allow unlimited free use of plotly inside the ipython notebook environment. Theplotly.jslibrary that is included in this package is free, open source, and maintained independently on GitHub at https://github.com/plotly/plotly.js. - The
plotly.jsbundle that is required for offline use is no longer downloaded and installed independently from this package:plotly.offline.download_plotlyjsis deprecated. - New versions of
plotly.jswill be tested and incorporated into this package as new versioned pip releases;plotly.jsis not automatically kept in sync with this package.
- Big data warning mentions
plotly.graph_objs.Scatterglas possible solution.
- If you're behind a proxy, you can make requests by setting the environmental variable HTTP_PROXY and HTTPS_PROXY (http://docs.python-requests.org/en/v1.0.4/user/advanced/#proxies). This didn't work for streaming, but now it does.
- Sometimes creating a graph with a private share-key doesn't work - the graph is private, but not accessible with the share key. Now we check to see if it didn't work, and re-try a few times until it does.
- The FigureFactory can now create dendrogram plots with
.create_dendrogram.
- Saving "world_readable" to your config file via
plotly.tools.set_configactually works.
- You can also save
auto_openandsharingto the config file so that you can forget these keyword argument inpy.iplotandpy.plot.
- Fixed validation errors (validate=False workaround no longer required)
- Auto-sync API request on import to get the latest schema from Plotly
.-access for nested attributes in plotly graph objects- General
.help()method for plotly graph objects - Specific attribute
.help(<attribute>)also included
- No more is streamable, streaming validation.
- Fixed typos in
plotandiplotdocumentations
- CHANGELOG
sharingkeyword argument forplotly.plotly.plotandplotly.plotly.iplotwith options'public' | 'private' | 'secret'to control the privacy of the charts. Depreciatesworld_readable
- If the response from
plotoriplotcontains an error message, raise an exception
-
heightandwidthare no longer accepted iniplot. Just stick them into your figure's layout instead, it'll be more consistent when you view it outside of the IPython notebook environment. So, instead of this:py.iplot([{'x': [1, 2, 3], 'y': [3, 1, 5]}], height=800)do this:
py.iplot({ 'data': [{'x': [1, 2, 3], 'y': [3, 1, 5]}], 'layout': {'height': 800} })
- The height of the graph in
iplotrespects the figure's height in layout