Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Add Legend | Basics: Line Charts
Visualization in Python with matplotlib
Section 1. Chapitre 7
single

single

bookAdd Legend

Glissez pour afficher le menu

Now let's modify the plot from the previous task with the legend!

Tâche

Glissez pour commencer à coder

  1. Add label parameters to both plots. Use 'United States' as label for the usa data and 'Canada' for the can data.
  2. Add a legend to the plot.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 7
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt