Hi,
I’m trying to create a splom graph where the x axes are different from the y axis eg. column A and B of a dataframe on x-axis and column C and D on y axis to observe cross-correlations.
In my understanding, the ‘xaxes’ and ‘yaxes’ keywords are used for this purpose. However what I tried so far does not work:
import numpy as np
import pandas as pd
import plotly.express as px
df = pd.DataFrame(np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]),
columns=['A', 'B', 'C', 'D'])
fig = px.scatter_matrix(data_frame=df, dimensions=['A', 'B', 'C', 'D'] )
fig.update_traces( xaxes=['x1', 'x2'], yaxes=['y3', 'y4'])
This code results in no plot, but if I use just one of the xaxes/yaxes keywords, only the first two dimensions show up in the plot.
My guess is I’m interpreting the use of ‘xaxes’ and ‘yaxes’ incorrect but the documentation does not really help.
I’m thankfull for any hint.
Cheers