pie-chart

How to draw multiple pie chart circles using Plotly?

How to draw multiple pie chart circles using Plotly? Question: How can you draw such a plotly graph? Input x=np.array([]), y=np.array([]), a and b parameters for pie chart. For example, in the figure: x = [1,2,3,4] y = [1,2,3,4] ab = [[1,1], [1,2], [3,7], [15,2]] There is a similar answer here. But this solution does …

Total answers: 1

How to plot multiple pie chart or bar chart from multi-index dataframe?

How to plot multiple pie chart or bar chart from multi-index dataframe? Question: Dataframe is as below. There are multiple index as category_1 & category_2 and two column as count & % I need to draw multiple (for each category_1) pie chart for category_2 & % and bar chart for category_2 & count. count % …

Total answers: 3

How to rearrange and set color in a nested pie plot

How to rearrange and set color in a nested pie plot Question: I am trying to draw a graph like this: The dataset is: Console Type Company Release Units_sold 0 PlayStation 2 Home Sony 2000 155000000 1 Nintendo DS Handheld Nintendo 2004 154002000 2 Nintendo Switch Hybrid Nintendo 2017 122550000 3 Game Boy Handheld Nintendo …

Total answers: 3

Pie Chart Missing Value Specific Column

Pie Chart Missing Value Specific Column Question: Let say we have a dataframe like this: import pandas as pd,numpy as np df = pd.DataFrame({‘id’: [‘1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’10’], ‘name’: [‘Arnold’,’Barney’,’Clark’,’Devi’,’Erik’,’Fiona’,’Genie’,’Harry’,’Isabella’,’Jane’], ‘score’: [89,92,70,np.NaN,78,np.NaN,80,94,np.NaN,100]}) I tried to percentage the missing value for column score df[[‘score’]].isnull().mean().mul(100).round(2).astype(str)+’%’ But I think it’s better to visualize he percentage, so how to make a pie …

Total answers: 1

How to target a specific trace in pie chart by name when using update_traces() selector attribute?

How to target a specific trace in pie chart by name when using update_traces() selector attribute? Question: The idea is to change the hover template only in the "Resto" trace. Here is a reproducible example: df_stack = pd.DataFrame({"Country": [‘Brasil’,’China’,’Estados unidos’,’Chile’,’India’,’Paises bajos’,’Vietnam’,’Peru’,’Corea, republica de’,’Indonesia’,’Resto’], "Dolars": [11599.42961799,7671.6791054099995,6198.81430321,4578.07,4153.13352132,3352.11349841,2998.44092833,2247.29957849,1968.7549113200002,1890.7284090800001,35635.107780379985], "Pct_change":[0.0846110761489467,0.2953716769009316,0.41561413372310074,0.21787800280514857,0.09245460739576772,0.18325289020293622,0.023857445957433443,0.2555960957383905,0.2319776811635097,0.12068329801455069,0.0] }) fig = go.Figure(data=[go.Pie(labels=df_stack["Country"], values=df_stack[‘Dolars’], hole=.5, customdata = np.transpose([df_stack["Pct_change"], …

Total answers: 1

how can I plot some graphics from data in a given dataset?

how can I plot some graphics from data in a given dataset? Question: I have a dataset containing data on covid cases. the link is as follows i have a 3 questions waiting to be answered: Pie chart of the top 10 countries with the highest number of cases and deaths per million. Stackplot visualization …

Total answers: 1

Grouping values in a clustered pie chart

Grouping values in a clustered pie chart Question: I’m working with a dataset about when certain houses were constructed and my data stretches from the year 1873-2018(143 slices). I’m trying to visualise this data in the form of a piechart but because of the large number of indivdual slices the entire pie chart appears clustered …

Total answers: 1

Error trying to plot pie chart, how to fix?

Error trying to plot pie chart, how to fix? Question: I was trying out plotting graphs for the first time and tried to do a bit of code where you can enter what parameter you want to graph, and then it graphs it as a pie chart. But when I tried running it, it returns …

Total answers: 1

How to create a matplotlib pie chart with input from a tkinter text widget?

How to create a matplotlib pie chart with input from a tkinter text widget? Question: I want to have a GUI with a tkinter text widget where the user can input values. After hitting the "Create!" button I want the program to open a new window and use the entered values to create a matplotlib …

Total answers: 1

How to plot categorical variables with a pie chart

How to plot categorical variables with a pie chart Question: I am concerned with a single column (fruit) from my df: | fruit | | ——————–| | apple, orange | | banana | | grapefruit, orange | | apple, banana, kiwi | I want to plot the values from fruit to a pie chart to …

Total answers: 1