How do I combine two independent box plots with the same axes into one box plot? The data all originate from the same data frame.
I have two graphs that I am trying to combine into one:
Graph 1)
Graph 2)
How do I combine them such that they look something like this (similar to when the hue parameter is used):
My current data frame looks like this. Note that I manually added a 'Data Type' column just so I can use the hue parameter in sns.boxplot to showcase my example. The 'Data Type' column is NOT in the actual data frame:
Annualized Return Annualized Volatility Weighting Method Data Type 0 0.100279 0.018287 Equal Weights Returns 1 0.052186 0.019462 Equal Weights Volatility 2 0.066412 0.021039 Equal Weights Returns 3 0.037828 0.030207 Equal Weights Volatility 4 0.083212 0.016781 Equal Weights Returns .. ... ... ... ... 195 0.064490 0.019199 ERC Volatility 196 0.074595 0.015279 ERC Returns 197 0.048052 0.015284 ERC Volatility 198 0.053672 0.013398 ERC Returns 199 0.054881 0.018141 ERC Volatility This is the code I used to produce the desired-looking output. Again, the hue parameter is manually added just for visualization purposes:
sns.boxplot(x='Weighting Method',y = 'Annualized Volatility',data=df,showfliers=False,color='tomato',hue='Data Type') 


