I've been working on some regplots and noticed that when I use sns.regplot seaborn cuts off my last and first datapoints. Here is my code. I know that I can set the xlim and ylim manually and therefore can circumvent this issue, but I was wondering if there is a more elegant way to solve this problem! Thanks so much in advance! Looking forward to hearing your solutions!
for rab, hrab, rep1, rep2 in zipped_final:
with sns.axes_style(style='ticks'):
fig, axes = plt.subplots(1,3, figsize =(18,6))
sns.regplot(
ax = axes[0],
data = rablog_df,
x = 'expected ratio',
y = rab,
ci = None)
axes[0].set_title('LOQ' + ' ' + f'{rab}', fontsize = 16)
axes[0].annotate('10 amol', xy =(rablog_df['expected ratio'][8], rablog_df[rab][8]))
sns.regplot(
ax = axes[1],
data = rabhlog_df,
x = 'expected concentration',
y = hrab,
ci = None)
axes[1].set_title('LOD' + ' ' + f'{rab}', fontsize = 16)
axes[1].annotate('10 amol', xy =(rabhlog_df['expected concentration'][8], rabhlog_df[hrab][8]))
sns.regplot(
ax = axes[2],
data = rabreplog_df,
x = rep1,
y = rep2,
ci = None)
axes[2].set_title(f'{rab}', fontsize = 16)
axes[2].annotate('10 amol', xy =(rabreplog_df[rep1][8], rabreplog_df[rep2][8]))
sns.despine(offset = 20, trim = True)
here a picture of the plot:

