Plot dhdl from TI
The function plot_ti_dhdl() allows
the user to plot the dhdl from TI estimator.
Several TI estimators could be passed to the
function to give a concerted picture of the whole alchemical transformation.
When custom labels are desirable, the user could pass a list of strings to the
labels for labelling each alchemical transformation differently. The color of
each alchemical transformation could also be set by passing a list of color
string to the colors. The unit in the y axis could be labelled to other units
by setting units, which by default is \(kT\). The user can pass
matplotlib.axes.Axes into the function to have the dhdl drawn on a
specific axes.
Please check How to plot TI dhdl for usage.
API Reference
- alchemlyb.visualisation.plot_ti_dhdl(dhdl_data: Any, labels: None | list[str] = None, colors: None | list[str] = None, units: None | str = None, ax: None | Axes = None) Axes[source]
Plot the dhdl of TI.
- Parameters:
dhdl_data (
TIor list) – One or moreTIestimator, where the dhdl value will be taken from.labels (List) – list of labels for labelling all the alchemical transformations.
colors (List) – list of colors for plotting all the alchemical transformations. Default: [‘r’, ‘g’, ‘#7F38EC’, ‘#9F000F’, ‘b’, ‘y’]
units (str) – The unit of the estimate. The default is None, which is to use the unit in the input. Setting this will change the output unit.
ax (matplotlib.axes.Axes) – Matplotlib axes object where the plot will be drawn on. If
ax=None, a new axes will be generated.
- Returns:
An axes with the TI dhdl drawn.
- Return type:
matplotlib.axes.Axes
Note
The code is taken and modified from Alchemical Analysis.
Changed in version 1.0.0: If no units is given, the units in the input will be used.
Changed in version 0.5.0: The units will be used to change the underlying data instead of only changing the figure legend.
Added in version 0.4.0.