October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots a bubble plot, for which we have seen a scatter plot earlier:
iris = pd.read_csv('iris_dataset.csv', delimiter=',')
iris['species'] = iris['species'].map({"setosa" : 0, "versicolor" : 1, "virginica" : 2})
plt.scatter(iris.petal_length, iris.petal_width, s=50*iris.petal_length*iris.petal_width, c=iris.species, alpha=0.3)
plt.xlabel('petal length')plt.ylabel('petal width')
plt.show()
Read now
Unlock full access