How to Install Seaborn on Linux?
Seaborn is a library mostly used for statistical plotting in Python. It is built on top of Matplotlib and provides beautiful default styles and color palettes to make statistical plots more attractive.
Seaborn has the following dependencies:
Installing Seaborn on Linux:
Use the below command in the terminal to install Seaborn:
pip install seaborn
In the terminal, it will look like this:
After the installation is completed you will get a successfully installed message at the end of the terminal as shown below:
After the installation let us see an example of a simple plot using Seaborn. We will be plotting a simple line plot using the iris dataset. Iris dataset contains five columns such as Petal Length, Petal Width, Sepal Length, Sepal Width, and Species Type. Iris is a flowering plant, the researchers have measured various features of the different iris flowers and recorded them digitally.
In the above example, a simple line plot is created using the lineplot() method.
Example 2: Plotting categorical scatter plots with Seaborn using Matplotlib.
- Categorical data is represented on the x-axis and values correspond to them represented through the y-axis.
- .striplot() function is used to define the type of the plot and to plot them on canvas using.
- .set() function is used to set labels of x-axis and y-axis.
- .title() function is used to give a title to the graph.
- To view plot we use .show() function.