About 254,000 results
Open links in new tab
  1. How to add a legend to matplotlib pie chart? - Stack Overflow

    Nov 8, 2013 · Putting it all together (besides the special chars - I had some problems activating TeX), try the following code: # The slices will be ordered and plotted counter-clockwise. # Set …

  2. python - Legend overlaps with the pie chart - Stack Overflow

    Jun 3, 2023 · If the need for a pie chart is unambiguously determined, let's proceed to place the legend. Placing the legend plt.legend() has two main arguments to determine the position of …

  3. A pie and a donut with labels — Matplotlib 3.10.3 documentation

    We will create a pie and a donut chart through the pie method and show how to label them with a legend as well as with annotations. As usual we would start by defining the imports and create …

  4. How to Create and Customize Matplotlib Pie Chart Legends: A ...

    Aug 4, 2024 · Matplotlib pie chart legend is an essential component when creating informative and visually appealing pie charts using the popular Python plotting library Matplotlib. In this …

  5. python - Getting percentages in legend from pie matplotlib pie chart ...

    I have created a pie chart using matplotlib below: import matplotlib.pyplot as plt labels = ['dogs','cats','birds','fish'] sizes = [34, 24,18,13] pie = plt.pie(sizes,autopct='%1.1f%%', …

  6. Matplotlib Pie Charts - W3Schools

    To add a list of explanation for each wedge, use the legend() function: Add a legend: To add a header to the legend, add the title parameter to the legend function. Add a legend with a header:

  7. Plot a Pie Chart in Python using Matplotlib - GeeksforGeeks

    Jan 2, 2025 · Matplotlib API has pie () function in its pyplot module which create a pie chart representing the data in an array. let's create pie chart in python. labels is a list of sequence of …

  8. Python Matplotlib Pie Charts: Data Visualization Guide - PyTutorial

    Dec 13, 2024 · Learn how to create beautiful pie charts using Python Matplotlib's plt.pie () function. Master customization, exploding slices, labels, and advanced styling techniques.

  9. Matplotlib.pyplot.legend() in Python - GeeksforGeeks

    Aug 1, 2024 · Matplotlib.pyplot.legend () function is a utility given in the Matplotlib library for Python that gives a way to label and differentiate between multiple plots in the same figure. …

  10. Pie Chart in Python with Legends - DataScience Made Simple

    In this Tutorial we will learn how to create pie chart in python with matplot library using an example. This python Pie chart tutorial also includes the steps to create pie chart with …

  11. Some results have been removed
Refresh