In this Python data visualization tutorial, we will work with Pandas scatter_matrix method to explore trends in data. Previously, we have learned how to create scatter plots with Seaborn and histograms with Pandas, for instance. In this post, we’ll focus on scatter matrices (pair plots) using Pandas. Now, Pandas is using Matplotlib to make the scatter matrix.
In this short tutorial, we will learn how to change the figure size of Seaborn plots. For many reasons, we may need to either increase the size or decrease the size, of our plots created with Seaborn.
How to Make Seaborn Plot Bigger
Now, if we only want to know how to increase the sie of a Seaborn plot we can use matplotlib and pyplot: e.g.;
import matplotlib.pyplot as plt fig = plt.gcf() fig.set_size_inches(12, 8)
Note, that we use the set_size_inches() method to make the Seaborn plot bigger.
When do We Need to Change the Size of a Plot?
One example, for instance, when we might want to change the size of a plot could be when we are going to communicate the results from our data analysis. In this case, we may compile the descriptive statistics, data visualization, and results from data analysis into a report, or manuscript for scientific publication.
Here, we may need to change the size so it fits the way we want to communicate our results. Note, for scientific publication (or printing, in general) we may want to also save the figures as high-resolution images.
In this post, we will learn how make scatter plots using R and the package ggplot2.
More specifically, we will learn how to make scatter plots, change the size of the dots, change the markers, the colors, and change the number of ticks.
Furthermore, we will learn how to plot a trend line, add text, plot a distribution on a scatter plot, among other things. In the final section of the scatter plot in R tutorial, we will learn how to save plots in high resolution.
Data visualization is a big part of the process of data analysis. In this post, we will learn how to make a scatter plot using Python and the package Seaborn. In detail, we will learn how to use the Seaborn methods scatterplot, regplot, lmplot, and pairplot to create scatter plots in Python.
- If you are interested in learning about more Python data visualization methods see the post “9 Data Visualization Techniques You Should Learn in Python“.
More specifically, we will learn how to make scatter plots, change the size of the dots, change the markers, the colors, and change the number of ticks. Furthermore, we will learn how to plot a regression line, add text, plot a distribution on a scatter plot, among other things. Finally, we will also learn how to save Seaborn plots in high resolution. That is, we learn how to make print-ready plots.
With the ever-increasing volume of data, it is impossible to tell stories without visualizations. Data visualization is an art of how to turn numbers into useful knowledge. Using Python we can learn how to create data visualizations and present data in Python using the Seaborn package.
In this post we are going to learn how to create the following 9 plots:
- Scatter Plot
- Bar Plot
- Time Series Plot
- Box Plot
- Heat Map
- Violin Plot
- Raincloud Plot
Python Data Visualization Tutorial: Seaborn
As previously mentioned in this Python Data Visualization tutorial we are mainly going to use Seaborn but also Pandas, and Numpy. However, to create the Raincloud Plot we are going to have to use the Python package ptitprince.