Skip to main content

All Questions

Tagged with
1 vote
1 answer
53 views

how to avoid over lapping legends and pie chart [duplicate]

I am trying to draw a pie chart using python matplotlib. How to position the legend and pie chart so they are not overlapping each other. My code is as below: import matplotlib.pyplot as plt import ...
PChao's user avatar
  • 429
0 votes
0 answers
210 views

How to map colors from multiple matplotlib subplot pie charts to a single figure legend

So I have been trying to get a legend working for a figure with multiple subplots that contain pie charts. The pie charts can contain any number of manufactures from a set list of manufacturers, but ...
Kgrover3's user avatar
0 votes
2 answers
739 views

Arrange legends plotly

I want to arrange the legend for my pie chart which I have built using plotly, by default it arranges the legend having the highest distribution first and with lower distribution after it, but i want ...
Abhishek Mishra's user avatar
1 vote
0 answers
269 views

How do I adjust the labels for my pie chart

I am creating a pie chart to show the percentages of property types available in a dataset in the column ["PTypes"]. I used the code below `import matplotlib.pyplot as plt # Pie chart df['...
Brytedata's user avatar
0 votes
1 answer
177 views

Creating a pie chart with unknown number of pies

I am trying to create function which creates a pie chart. This pie chart can have n number of pies that's why I am taking function arguments as *args. I found a way to create colors according to the ...
Anudocs's user avatar
  • 686
1 vote
1 answer
3k views

How to show filtered legend labels in pyplot pie chart based on the values of contributions?

I would like to plot a pie chart that shows contributions that are more than 1%, and their corresponding legend label. I have managed showing the percentage values I wanted on the pie (see script ...
xiaoshir's user avatar
  • 215
48 votes
1 answer
101k views

Legend overlaps with the pie chart

Using matplotlib in python. The legend overlaps with my pie chart. Tried various options for "loc" such as "best" ,1,2,3... but to no avail. Any Suggestions as to how to either exactly mention the ...
cassandra's user avatar
  • 627
1 vote
2 answers
5k views

Python - How to hide labels and keep legends matplotlib?

I would like to remove the labels of a pie chart and keep the legends only. Currently, my code has both. Any idea how to remove the labels? I've tried the code below: plt.legend(labels, loc="best") ...
Gonzalo's user avatar
  • 1,104