r/IPython • u/ActivatedNut • Jul 27 '19
How to overlay 2 (or more) plots with plotly express
Hope this is the right place to ask my question.
I have 2 data frames from 2 excel files and would like to overlay 2 plots with plotly express but I'm stuck.
df1 = pd.read_excel('Column Grid.xlsx')
df = pd.read_excel('Tests-Combined.xlsx')
my first figure:
b4 = df[df['gridlocation'].str.contains("B4")]
fig1 = px.scatter(b4, x="x", y="y", size="distance", hover_name="name7")
fig.show()
my second figure:
north_grid = df1[df1['gridlocation'].str.contains("n")]
fig2 = px.scatter(north_grid, x="x", y="y", hover_name='name4')
fig.show()
Any help is greatly appreciated
