Figure Factories in Python

Figure Factories are dedicated functions for creating very specific types of plots.


Plotly Studio: Transform any dataset into an interactive data application in minutes with AI. Try Plotly Studio now.

plotly.figure_factory

The plotly.figure_factory module contains dedicated functions for creating very specific types of plots that are difficult to create with graph objects and Plotly Express.

The following plot types can be created with Figure Factory:

The following legacy Figure Factory functions have been replaced by Plotly Express functions, or native Graph Objects trace types, and have been removed from the library in version 7.0. Use the recommended alternatives instead:

Reference

For more information about the contents of plotly.figure_factory, please refer to our API Reference documentation.

What About Dash?

Dash is an open-source framework for building analytical applications, with no Javascript required, and it is tightly integrated with the Plotly graphing library.

Learn about how to install Dash at https://dash.plot.ly/installation.

Everywhere in this page that you see fig.show(), you can display the same figure in a Dash application by passing it to the figure argument of the Graph component from the built-in dash_core_components package like this:

import plotly.graph_objects as go # or plotly.express as px
fig = go.Figure() # or any Plotly Express function e.g. px.bar(...)
# fig.add_trace( ... )
# fig.update_layout( ... )

from dash import Dash, dcc, html

app = Dash()
app.layout = html.Div([
    dcc.Graph(figure=fig)
])

app.run(debug=True, use_reloader=False)  # Turn off reloader if inside Jupyter