Note

Go to the endto download the full example code or to run this example in your browser via JupyterLite or Binder.

Seaborn example#

This example demonstrates a Seaborn plot. Figures produced Matplotlibandby any package that is based on Matplotlib (e.g., Seaborn), will becaptured by default. SeeImage scrapers for details.

plot 2 seaborn
# Author: Michael Waskom & Lucy Liu# License: BSD 3 clauseimportmatplotlib.pyplotaspltimportnumpyasnpimportseabornassns# Enforce the use of default set style# Create a noisy periodic datasety_array=np.array([])x_array=np.array([])rs=np.random.RandomState(8)for_inrange(15):x=np.linspace(0,30/2,30)y=np.sin(x)+rs.normal(0,1.5)+rs.normal(0,0.3,30)y_array=np.append(y_array,y)x_array=np.append(x_array,x)# Plot the average over replicates with confidence intervalsns.lineplot(y=y_array,x=x_array)# to avoid text outputplt.show()

Total running time of the script: (0 minutes 2.083 seconds)

Estimated memory usage: 294 MB

Gallery generated by Sphinx-Gallery