from matplotlib import pyplot as plt
import pandas as pd
import seaborn as sns
df = pd.DataFrame({})
df[soi_name]=soi
df[outcome_name]=outcome
soi,outcome = utils.format_cols(soi, outcome,'continuous',agg_method)
sns.factorplot(data=df, x=outcome_name,y=soi_name,hue=outcome_name,kind='box')
plt.savefig(ofilepath)
So the code snippet used to generate this boxplot is just above. outcome is a binary float type pandas series. soi is a float type pandas series. This x-axis shift occurs for boxplots and violinplots. When I generate factor plots with the following code:
df = pd.DataFrame({})
df[soi_name]=soi
df[outcome_name]=outcome
sns.factorplot(data=df, x=outcome_name,y=soi_name,hue=outcome_name)
plt.savefig(ofilepath)
I get my desired outputs. Any ideas with why the shift for the box plots might be happening?