Figures module¶
Plot configuration.
-
sdanalysis.figures.configuration.
colour_orientation
(orientations, light_colours=False)[source]¶ - Return type
-
sdanalysis.figures.configuration.
frame2data
(frame, order_function=None, order_list=None, molecule=Trimer(radius=0.637556, distance=1.0, angle=120, moment_inertia_scale=1.0), categorical_colour=False)[source]¶ Convert a Frame to data for plotting in Bokeh.
This takes a frame and performs all the necessary calculations for plotting, in particular the colouring of the orientation and crystal classification.
- Parameters
frame (
Frame
) – The configuration which is to be plotted.order_function (
Optional
[Callable
[[Frame
],ndarray
]]) – A function which takes a frame as it’s input which can be used to classify the crystal.order_list (
Optional
[ndarray
]) – A pre-classified collection of values. This is an alternate approach to using the order_functionmolecule (
Molecule
) – The molecule which is being plotted.categorical_colour (
bool
) – Whether to classify as categories, or liquid/crystalline.
- Return type
- Returns
- Dictionary containing x, y, colour, orientation and radius values for each
molecule.
-
sdanalysis.figures.configuration.
plot_circles
(mol_plot, source, categorical_colour=False, factors=None, colormap=('#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'))[source]¶ Add the points to a bokeh figure to render the trimer molecule.
This enables the trimer molecules to be drawn on the figure using only the position and the orientations of the central molecule.
- Return type
figure
-
sdanalysis.figures.configuration.
plot_frame
(frame, order_function=None, order_list=None, source=None, molecule=Trimer(radius=0.637556, distance=1.0, angle=120, moment_inertia_scale=1.0), categorical_colour=False, factors=None, colormap=None)[source]¶ Plot a snapshot using bokeh.
- Parameters
frame (
Frame
) – The frame determining the positions to plotorder_function (
Optional
[Callable
[[Frame
],ndarray
]]) – A function which takes a frame and determines orderingorder_list (
Optional
[ndarray
]) – A pre-computed list of ordering.source (
Optional
[ColumnDataSource
]) – An existing bokeh ColumnDataSource to use for plotting.molecule (
Molecule
) – The molecule which is being plotted, used to calculate additional positions.categorical_colour (
bool
) – Toggle which colours liquid/crystal, or each crystalfactors (
Optional
[List
[Any
]]) – The factors used for plotting. This is for continuity across a range of figures.colourmap – The collection of colours to use when plotting.
- Returns
Bokeh plot
Bokeh dashboard for interactive visualisation of thermodynamic properties.
-
sdanalysis.figures.thermodynamics.
update_datacolumns
(attr, old, new)[source]¶ Update data as a callback.
-
sdanalysis.figures.thermodynamics.
update_factors
(attr, old, new)[source]¶ Update factors as a callback.