""" Cell hole ========= """ # %% # Cells can have holes by specifying the `hole_diameter` argument. The value # corresponds to the largest possible cell diameter. import plotly import ptvis elements = list(ptvis.Element) * 2 radii = [1]*len(ptvis.Element) + [2]*len(ptvis.Element) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells(fig, elements, radii, hole_diameter=0.5) plotly.io.show(fig) # %% # Texts can be drawn in the holes by specifying the `hole_texts` argument. import plotly import ptvis elements = list(ptvis.Element) * 2 radii = [1]*len(ptvis.Element) + [2]*len(ptvis.Element) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells( fig, elements, radii, hole_diameter=0.5, hole_texts={element: element.symbol for element in ptvis.Element}, ) plotly.io.show(fig)