March 2020
Beginner to intermediate
352 pages
8h 40m
English
We have already discussed univariate, bivariate, and multivariate analysis in Chapter 7, Correlation. Let's revise and see how much you remember.
The simplest way to visualize the numeric data and their distribution is by using a histogram. Let's plot the histogram here; we start by importing the required matplotlib.pyplot library:
import matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3D%matplotlib inline
Next, we draw the histogram, as shown:
fig = df_wines.hist(bins=15, color='fuchsia', edgecolor='darkmagenta', linewidth=1.0, xlabelsize=10, ylabelsize=10, xrot=45, yrot=0, figsize=(10,9), grid=False)plt.tight_layout(rect=(0, 0, 1.5, 1.5))
Note that we have used the tight_layout() method to keep the graph ...
Read now
Unlock full access