Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't import plotly.figure_factory

I'm not being able to import plotly.figure_factory

The code I use is based on this example

The module is imported by the following snippet:

import plotly.plotly as py
import plotly.figure_factory as FF

I couldn't find any documentation on figure_factory in plotly's website.

Any ideas ?

like image 663
Pedro Braz Avatar asked Feb 24 '17 17:02

Pedro Braz


People also ask

How do I import a plotly library?

To install the package, open up terminal and type $ pip install plotly or $ sudo pip install plotly . Plotly's graphs are hosted using an online web service, so you'll first have to setup a free account online to store your plots. To retrieve your personal API key, follow the link here: https://plot.ly/settings/api#/.

How do I import plotly into a Jupyter Notebook?

Simply visit plot.ly and select the + Create button in the upper right hand corner. Select Notebook and upload your Jupyter notebook (. ipynb) file! The notebooks that you upload will be stored in your Plotly organize folder and hosted at a unique link to make sharing quick and easy.

What is plotly figure factory?

Plotly's Figure Factory Module Plotly's Python API contains a figure factory module which includes many wrapper functions that create unique chart types that are not yet included in plotly. js, Plotly's open-source graphing library.

Is plotly deprecated?

plotly module is deprecated, | Data Science and Machine Learning | Kaggle.


1 Answers

Plotly's documentation is sometimes a bit inconsistent and missed some updates to the library itself.

If you substitute your second line with

from plotly.tools import FigureFactory as FF

your code should work as expected.

like image 141
Maximilian Peters Avatar answered Sep 25 '22 06:09

Maximilian Peters