I have been trying to make a scatterplot matrix using plotly go function splom with moderate success (can't show the actual plot, sorry), but I would like to modify 2 things:
-Axis are automatically and independently scaled to the values of each marker, while I need them to have the same scale in both axis.
-I would like to add a diagonal line to each plot.
Each plot compares the Outgroup f3 statistics of the same population at different points in time in relationship with other populations, so the whole point of the plot is to see if there is any deviation of the diagonal.
My code right now looks like this:
fig = go.Figure(data=go.Splom(
dimensions=[dict(label='Period1',
values=p1['est'].astype("float"),
axis=dict(matches=True,type="linear"),
),
dict(label='Period2',
values=p2['est'].astype("float"),
axis=dict(matches=True,type="linear")),
dict(label='Period3',
values=p3['est'].astype("float"),
axis=dict(matches=True,type="linear")),
dict(label='Period4',
values=p4['est'].astype("float"),
axis=dict(matches=True,type="linear")),
dict(label='Period5',
values=p5['est'].astype("float"),
axis=dict(matches=True,type="linear"))],
diagonal_visible=False, # remove plots on diagonal
showupperhalf=False,
text=p1['pop2'],
marker=dict(color=list(pop_col),
showscale=False, # colors encode categorical variables
line_color='white', line_width=0.5)
))
fig.update_layout(
title='Outgroup f3 statistics per period',
width=1600,
height=1600,
)
fig.show()
Any idea of how to do this?
Thanks.