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.