October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots two figures with multiple plots in each:
iris = pd.read_csv('iris_dataset.csv', delimiter=',')
plt.close('all')
fig = plt.figure(1, figsize=(12, 9))ax1 = plt.subplot2grid((3, 3), (0, 0))ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2)ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2)ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2)
ax1.hist(iris['petal_width'])ax2.scatter(iris['petal_length'], iris['petal_width'], s=50*iris['petal_length']*iris['petal_width'], alpha=0.3)ax3.scatter(iris['sepal_length'], ...
Read now
Unlock full access