Show relationship between two numeric variables.
plt.scatter(df["sepal_length"], df["petal_length"], c=df["species"])
plt.xlabel("Sepal Length")
plt.ylabel("Petal Length")
plt.title("Iris Flowers")
plt.show()
Used in ML: visualize feature pairs, clusters.
Show frequency distribution of one numeric variable.
plt.hist(df["age"], bins=10, color="skyblue", edgecolor="black")
plt.xlabel("Age")
plt.ylabel("Frequency")
plt.title("Age Distribution")
plt.show()
Used in ML: check feature distributions, spot skewness.