SEABORN FOR INFORMATIVE GRAPHS IN PYTHON
- ABOUT SEABORN
Seaborn is a library for making attractive and informative statistical graphics in Python. It is built on top of matplotlib and tightly integrated with the PyData stack, including support for numpy and pandas data structures and statistical routines from scipy and statsmodels.
Seaborn offers the following features-
- Tools that fit and visualize linear regression models for different kinds of independent and dependent variables
- Functions that visualize matrices of data and use clustering algorithms to discover structure in those matrices
- A function to plot statistical timeseries data with flexible estimation and representation of uncertainty around the estimate
- Some of the functions plot directly into a matplotlib axes object, while others operate on an entire figure and produce plots with several panels. In the latter case, the plot is drawn using a Grid object that links the structure of the figure to the structure of the dataset in an abstract way.
- Because seaborn uses matplotlib, the graphics can be further tweaked using matplotlib tools and rendered with any of the matplotlib backends to generate publication-quality figures. Seaborn can also be used to target web-based graphics through the mpld3 and Bokeh libraries.
- USING SEABORN TO PLOT GRAPHS IN PYTHON-
Installing Seaborn-
Importing the required libraries-
Loading the dataset brain_networks -> Select a subset of the networks -> Create a custom palette to identify the networks -> Convert the palette to vectors that will be drawn on the side of the matrix -> Create a custom heatmap for the heatmap values -> Draw the full plot
Graph 2-
Graph 3-
Load the long-form example gammas dataset -> Plot the response with standard error
Graph 4 -
Generate an example radial dataset -> Convert the dataframe to long form -> Set up a grid of axes with a polar projection -> Draw a scatterplot onto each axes in the grid.



No comments:
Post a Comment