Strip Charts with Plotly Express¶
px.strip() function will make strip charts using underlying
box traces with the box hidden.
import plotly.express as px df = px.data.tips() fig = px.strip(df, x="total_bill", y="day") fig.show()
import plotly.express as px df = px.data.tips() fig = px.strip(df, x="total_bill", y="time", color="sex", facet_col="day") fig.show()
What About Dash?¶
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_server(debug=True, use_reloader=False) # Turn off reloader if inside Jupyter