I have statistics that correspond to two different variables, X and Y. For example:
x_stats = {'count': 100.0,
'mean': -0.19,
'std': 0.23,
'min': -0.67,
'25%': -0.38,
'50%': -0.15,
'75%': -0.02,
'max': 0.34}
y_stats = {'count': 100.0,
'mean': 0.34,
'std': 0.08,
'min': 0.15,
'25%': 0.28, # Q1
'50%': 0.34, # Q2
'75%': 0.38, # Q3
'max': 0.62}
It's easy enough to get a boxplot for each variable individually:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Box())
fig.update_traces(q1=[x_stats.get('25%'), y.get('25%')],
median=[x_stats.get('50%'), y.get('50%')],
q3=[x_stats.get('75%'), y_stats.get('75%')],
lowerfence=[x_stats.get('min'), y_stats.get('min')],
upperfence=[x_stats.get('max'), y_stats.get('max')],
mean=[x_stats.get('mean'), y_stats.get('mean')],
sd=[x_stats.get('std'), y_stats.get('std')],
)
fig.show()
However, I'd like to make a "scatter plot" (really just the axes lines with one ellipse) that looks primarily at the joint distribution of the two variables (focusing mainly on the means and standard deviations). The center of the ellipse would be at (mean_x, mean_y) and the axes of the ellipse would be (std_x, std_y). So then the plot would look something like this:
How can I make such a graph in plotly express?