I am trying to create a scatterplot matrix in which the x and y axes of variables are not the same (and the number of variables is not the same either)… For example, I'd like three inputs plotted along the x axis and 2 outputs plotted along the y axis, and therefor a scatterplot matrix of 6 scatter plots showing one input vs one output
I have not found a way to do this in matplotlib, seaborn, pandas, or plotly. Has anyone ever done something like this before or know a clever way to create a plot like this?
Everything I have found so far plots the same n number of variables against themselves for n^2 number of plots
Code:
import pandas as pd
import seaborn as sns
import plotly.express as px
headings = ['a','b','c','d','e']
data = [[21,22,23,24,25],[10,12,13,14,15],[14,2,3,17,5],[6,17,22,9,14],[16,17,18,19,20]]
df = pd.DataFrame(data=data, columns=headings)
pd.plotting.scatter_matrix(df)
sns.pairplot(df)
fig = px.scatter_matrix(df)
fig.show()
Output:



