""" Radius range ============ """ # %% # By default, the range of the radial coordinate are determined by values of # the second argument. If all the values are nonnegative, the range is from # zero to the maximum of the values. import plotly import ptvis elements = list(ptvis.Element) * 4 radii = ( [1.]*len(ptvis.Element) + [2.]*len(ptvis.Element) + [3.]*len(ptvis.Element) + [4.]*len(ptvis.Element) ) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells(fig, elements, radii) plotly.io.show(fig) # %% # If all the values are nonpositive, the range is from the minimum of the # values to zero. import plotly import ptvis elements = list(ptvis.Element) * 4 radii = ( [-4.]*len(ptvis.Element) + [-3.]*len(ptvis.Element) + [-2.]*len(ptvis.Element) + [-1.]*len(ptvis.Element) ) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells(fig, elements, radii) plotly.io.show(fig) # %% # Otherwise, the range is from the minimum to maximum of the values. import plotly import ptvis elements = list(ptvis.Element) * 4 radii = ( [-1.5]*len(ptvis.Element) + [-0.5]*len(ptvis.Element) + [0.5]*len(ptvis.Element) + [1.5]*len(ptvis.Element) ) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells(fig, elements, radii) plotly.io.show(fig) # %% # The range can be changed by the `radius_min` and `radius_max` arguments. import plotly import ptvis elements = list(ptvis.Element) * 4 radii = ( [-1.5]*len(ptvis.Element) + [-0.5]*len(ptvis.Element) + [0.5]*len(ptvis.Element) + [1.5]*len(ptvis.Element) ) fig = plotly.graph_objects.Figure() ptvis.attach_polar_bar_cells( fig, elements, radii, radius_min=-2.5, radius_max=2.5, ) plotly.io.show(fig)