MulaiMulai sekarang secara gratis

Styling a scatterplot

In this exercise, you'll be using plt.scatter() to plot the father and son height data from the video. The father_son DataFrame has been pre-loaded for you. In each scatterplot, plot father_son.fheight as x-axis and father_son.sheight as y-axis.

Latihan ini adalah bagian dari kursus

Visualizing Geospatial Data in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import matplotlib.pyplot
import matplotlib.pyplot as ____

# Scatterplot 1 - father heights vs. son heights with darkred square markers
plt.scatter(father_son.fheight, father_son.sheight, ____ = 'darkred', ____ = 's')

# Show your plot
plt.____()
Edit dan Jalankan Kode