Hi all. I am trying to make a sunburst plot to show environments of origin for samples in a metadataset. I’ve followed the example plot as closely as I can and I’m just not sure why this isn’t working.
Trace call is as below:
assert(len(labels_) == len(parents_) == len(values_))
trace = go.Sunburst(
labels = labels_,
parents = parents_,
values = values_,
)
# Update layout for tight margin
# See https://plot.ly/python/creating-and-updating-figures/
#fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
layout = go.Layout(
margin = go.layout.Margin(t=0, l=0, r=0, b=0)
)
fig = go.Figure([trace], layout)
fig.show()
And labels/parents/values are here:
('', 'all', 122)
('all', 'geological fracture', 15)
('all', 'borehole', 50)
('all', 'ocean trench', 8)
('all', 'spring', 11)
('all', 'hydrothermal vent', 23)
('all', 'mine', 7)
('all', 'lake', 15)
('all', 'seep', 10)
('all', 'well', 7)
('all', 'aquifer', 12)
('borehole', 'research borehole', 47)
('spring', 'hot spring', 3)
('hydrothermal vent', 'marine hydrothermal vent chimney', 4)
('spring', 'alkaline hot spring', 2)
('lake', 'subglacial', 12)
('ocean trench', 'outer trench wall', 5)
('seep', 'mud volcano', 10)
('spring', 'mineral spring', 6)
('well', 'water well', 5)
('well', 'oil well', 3)
('geological fracture', 'aquifer', 6)
('aquifer', 'sub-continental aquifer', 12)
('mine', 'mine drainage', 1)
('geyser', 'mineral deposit', 3)
('hydrothermal vent', 'marine hydrothermal vent', 3)
Thanks for the help, anything that can guide me in the right direction would be much appreciated.