schrodinger.ui.qt.radial_plot module¶
Widgets to plot various kinds of radial plots
- class schrodinger.ui.qt.radial_plot.Sector(ring: str, theta_0: float, theta_1: float, data: Any)¶
Bases:
object
A Sector described a specific region within a one ring of a RadianRingHistogram and that region’s associated data, if any.
- Variables
ring – the label associated with the ring the region is located in
theta_0 – the lower bound theta of the region in radians
theta_1 – the upper bound theta of the region in radians
data – any associated data with the region
- ring: str¶
- theta_0: float¶
- theta_1: float¶
- data: Any¶
- __init__(ring: str, theta_0: float, theta_1: float, data: Any) None ¶
- class schrodinger.ui.qt.radial_plot.RadialRingHistogram(figure, *args, **kwargs)¶
Bases:
PyQt6.QtCore.QObject
A RadialRingHistogram is a radial plot such that each ring, i.e each concentric circle, describes a separate histogram. Each histogram in the rings share the same x-axis namely the theta coordinates of the polar plot
Because the y-axis, i.e. the radius of the polar plot, is not used to display the frequency of the histogram data, another dimension is needed to display the frequency for example, color
- Variables
sectorClicked – emitted when a sector is clicked on by the user
mouseRightButtonClicked – emitted when mouse right click button pressed on plot
- sectorClicked¶
A
pyqtSignal
emitted by instances of the class.
- mouseRightButtonClicked¶
A
pyqtSignal
emitted by instances of the class.
- __init__(figure, *args, **kwargs)¶
Initialize the histogram
- Parameters
figure (smatplotlib.SmatplotlibCanvas) – the canvas to plot the figure on
- initFigure()¶
Clear and initialize the internal matplotlib figure
- setRingData(ring_types, ring_data)¶
Set the data associated with each ring and the labels that are used for each ring in the plot.
NOTE: len(ring_types) must equal len(ring_data)
- drawTicks()¶
Set the y-tick labels on the polar plot to the ring_types set from setRingData
- setSectorData(sector_data, sector_width)¶
Set the relevant information regarding data for each sector
- drawPlot(*args, **kwargs)¶
Plot the histograms with the data for each ring
- shouldShowSectorAnnotation(sector)¶
Whether the given sector should show an annotation
- Parameters
sector (Sector) – the sector in question
- Returns
whether to display the annotation
- Return type
bool