Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots more attractive. It is built on the top of matplotlib library and also closely integrated into the data structures from pandas.
A box plot helps to maintain the distribution of quantitative data in such a way that it facilitates the comparisons between variables or across levels of a categorical variable. The main body of the box plot showing the quartiles and the median’s confidence intervals if enabled. The medians have horizontal lines at the median of each box and while whiskers have the vertical lines extending to the most extreme, non-outlier data points and caps are the horizontal lines at the ends of the whiskers.
Syntax: seaborn.boxplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, width=0.8, dodge=True, fliersize=5, linewidth=None, whis=1.5, ax=None, **kwargs)
x, y, hue: Inputs for plotting long-form data.
data: Dataset for plotting. If x and y are absent, this is interpreted as wide-form.
color: Color for all of the elements.
Returns: It returns the Axes object with the plot drawn onto it.
Example 1: Basic visualization of “fmri” dataset using violinplot()
Example 2: Grouping data points on the basis of category, here as region and event.
Example 3: Basic visualization of “tips” dataset using boxplot()
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Matplotlib.axes.Axes.boxplot() in Python
- Plotting graph using Seaborn | Python
- Python | Titanic Data EDA using Seaborn
- Grid Plot in Python using Seaborn
- Countplot using seaborn in Python
- Lineplot using Seaborn in Python
- Barplot using seaborn in Python
- Scatterplot using Seaborn in Python
- Violinplot using Seaborn in Python
- Swarmplot using Seaborn in Python
- Stripplot using Seaborn in Python
- Plotting graph For IRIS Dataset Using Seaborn And Matplotlib
- Plotting different types of plots using Factor plot in seaborn
- Introduction to Seaborn - Python
- Python - seaborn.jointplot() method
- Python - seaborn.factorplot() method
- Python - seaborn.lmplot() method
- Seaborn.barplot() method in Python
- Python - seaborn.pairplot() method
- Python - seaborn.FacetGrid() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.