March 2020
Beginner to intermediate
352 pages
8h 40m
English
Generally, we start with one-dimensional visualization and move to further dimensions. Having seen 2-D visualization earlier, let's add one more dimension and plot 3-D charts. We will use the matplotlib.pyplot method to do so:
fig = plt.figure(figsize=(16, 12))ax = fig.add_subplot(111, projection='3d')
xscale = df_wines['residual sugar']yscale = df_wines['free sulfur dioxide']zscale = df_wines['total sulfur dioxide']ax.scatter(xscale, yscale, zscale, s=50, alpha=0.6, edgecolors='w')
Here, we are interested in looking into the residual sugar, free sulfur dioxide, and total sulfur dioxide columns.
Read now
Unlock full access