Is it possible to do a "zoom inset" using seaborn?

Viewed 12611

This example from matplotlib shows how to do an inset. However I am working with seaborn, specifically the kdeplot.

sns.kdeplot(y, label='default bw')
sns.kdeplot(y, bw=0.5, label="bw: 0.2", alpha=0.6)
sns.kdeplot(y, linestyle="--", bw=2, label="bw: 2", alpha=0.6)
sns.kdeplot(y, linestyle=":", bw=5, label="bw: 5", alpha=0.6)

It so happens that I have a lot of empty space on the right side of the graph and I would like to put a zoomed in inset there to clarify the lower x range. (If need be I could move the legend out as well, but that's besides the point)

enter image description here

Is it possible to do that with seaborn alone or do I have to forego the convenience of seaborn and convert the plots to matplotlib?

1 Answers
Related