✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

How to create main effects plot

Hi,

Can someone guide me on how to create main effects plot in Dash? I am looking for plot something like below
main

The data used is as below
‘’’
expression eye contact
expression flirty face 8.4
smile 8.93
nosmile 7.83
eye contact eye contact 8.83
no eye contact 7.94
‘’’

I got this sample from https://peltiertech.com/main-effects-and-interaction-plots/

Regards,
Karthik

@karthik167 This post should answer your question.

1 Like

@RenaudLN thanks for the pointer. Based on that, I am using the code as below

‘’’
import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Scatter(

x=[["Cat1","Cat1",None,"Cat2","Cat2"],[1,2,None,2,3]],

y=[10, 20, None, 15, 10],

connectgaps=False

))

fig.show()
‘’’
to get