This page was generated from simple/example_violin.ipynb.
Interactive online version: Binder badge.


This example requires the file.

Violin plot demoΒΆ

This example shows you how to make a violin plot using the psyplot.project.ProjectPlotter.violinplot method.

import psyplot.project as psy
axes = iter(psy.multiple_subplots(2, 2, n=3))
for var in ['t2m', 'u', 'v']:
        '',  # netCDF file storing the data
        name=var, # one plot for each variable
        t=range(5),  # one violin plot for each time step
        z=0, x=0,      # choose latitude and longitude as dimensions
        ylabel="{desc}",  # use the longname and units on the y-axis
        color='coolwarm', legend=False,
        xticklabels='%B %Y'  # choose xaxis labels to use month and year info,