Presenting Large Number of Slices

In plotly, the sunbrust chart have several slices in its pie which helps to present the data more understandable and in efficient way, as each column of the data is separated through different colors.Various data slices can be built in a single pie which lead to take less space in layout.Lets see an example which is given below

Example:

Python3




import plotly.graph_objects as go
import pandas as pd
 
df = pd.read_csv('https://raw.githubusercontent.com / plotly / datasets / 718417069ead87650b90472464c7565dc8c2cb1c / sunburst-coffee-flavors-complete.csv')
 
fig = go.Figure()
 
fig.add_trace(go.Sunburst(
    ids = df.ids,
    labels = df.labels,
    parents = df.parents,
    domain = dict(column = 0)
))
 
fig.show()


Output: 



Sunburst Plot using graph_objects class in plotly

Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.

Similar Reads

Sunburst Plot using graph_objects class

If Plotly Express does not render a good starting point, it is also accessible to custom from the more generic go.Sunburst class from plotly.graph_objects.The sunbrust is the prototype  for exhibit hierarchical data.Each level of the hierarchy is represented by one ring or circle with the innermost circle as the top of the hierarchy.The sunbrust chart without any hierarchical data looks similar to doughnut chart....

Showing Branchvalues

...

Presenting Large Number of Slices

With branchvalues “total”, the value of parent to represent the width of the wedge. With branchvalues “remainder”, the parent width is demarcate by its own values plus the value of children.The sum of the children cannot exceed to the sum of the parent when the branch values are set to be “total”.Lets see an example to get know more about it, shown below:...