The style package within the matplotlib library makes it easier to change the style of the plots that are being plotted. It is very easy to change to the famous ggplot style of the R language or use the Nate Silver's website http://fivethirtyeight.com/ for fivethirtyeight style. The following example shows the plotting of a simple line chart with the ggplot style:
An area plot is useful for comparing the values of different factors across a range. The area plot can be stacked in nature, where the areas of the different factors are stacked on top of each other. The following code gives an example of a stacked area plot:
A heatmap is a graphical representation where individual values of a matrix are represented as colors. A heatmap is very useful in visualizing the concentration of values between two dimensions of a matrix. This helps in finding patterns and gives a perspective of depth.
Let's start off by creating a basic heatmap between two dimensions. We'll create a 10 x 6 matrix of random values and visualize it as a heatmap:
A scatter plot matrix can be formed for a collection of variables where each of the variables will be plotted against each other. The following code generates a DataFrame df, which consists of four columns with normally distributed random values and column names named from a to d:
A bubble chart is basically a scatter plot with an additional dimension. The additional dimension helps in setting the size of the bubble, which means that the greater the size of the bubble, the larger the value that represents the bubble. This kind of a chart helps in analyzing the data of three dimensions.
The following code creates a sample data of three variables and this data is then fed to the plot() method where its kind is mentioned as a scatter and s is the size of the bubble: