0
`def comparison_visuals(df_new):
matplotlib.rc_file_defaults()
ax1 = sns.set_style(style=None, rc=None )
fig, ax1 = plt.subplots(figsize=(12,6))
sns.lineplot(data = df_new, x='Date', y= 
(df_new['Transfer_fee'])/1000000, marker='o', sort = False, 
ax=ax1)
ax2 = ax1.twinx()
from matplotlib.ticker import FormatStrFormatter
ax1.xaxis.set_major_formatter(FormatStrFormatter('%.0f'))
sns.lineplot(data = df_new, x='Date', y='Inflation', alpha=0.5, 
ax=ax2)
from matplotlib.ticker import FormatStrFormatter
ax2.xaxis.set_major_formatter(FormatStrFormatter('%.0f'))
comparison_visuals(df_new)'

(Edited to paste code above)

Can anyone tell me what the shaded area represents on my line graph (see screenshot)? The middle line represents the mean. I haven't specifically added it. I would like to know first what it is and secondly how to remove it (I might chose to keep it if I find out what it represents and it adds value to my visualisation).

Any related answers I've come across don't del with this directly. Thansk in advance.

Screenshot of line graph

Tadhgo
  • 13
  • 6
  • 1
    Seaborn adds a confidence interval when the same x-value appears multiple times with different y-values. See `ci=` in the [lineplot docs](https://seaborn.pydata.org/generated/seaborn.lineplot.html). – JohanC Apr 25 '22 at 20:26
  • @JohanC thanks very much. feel free to add that as an answer and i will accept – Tadhgo Apr 25 '22 at 20:35

0 Answers0