Aan de slagGa gratis aan de slag

Matplotlib color codes

Seaborn offers several options for modifying the colors of your visualizations. The simplest approach is to explicitly state the color of the plot. A quick way to change colors is to use the standard matplotlib color codes.

Deze oefening maakt deel uit van de cursus

Intermediate Data Visualization with Seaborn

Cursus bekijken

Oefeninstructies

  • Set the default Seaborn style and enable the matplotlib color codes.
  • Create a displot for the fmr_3 column using matplotlib's magenta (m) color code.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Set style, enable color code, and create a magenta displot
sns.set(color_codes=____)
sns.displot(df['fmr_3'], color='____')

# Show the plot
plt.____()
Code bewerken en uitvoeren