pylipid.plot.plot_residue_data

pylipid.plot.plot_residue_data(residue_index, interactions, gap=200, ylabel=None, fn=None, title=None, fig_close=False)[source]

Plot interactions as a function of residue index

Parameters
  • residue_index (list) – Residue indices in an ascending order. If a residue index is smaller than its preceding one, the plotting function will consider it as the start of a new chain and will plot the following data in a new figure. A gap in residue index that is less than gap will be marked as gray areas in the figure, but a gap that is larger than gap will start a new figure.

  • interactions (list) – Values to plot. In the same order as residue_index.

  • gap (int, optional, default=200) – The number of missing residues in residue_index that initiate a new figure. The gap between two adjacent index in residue_index that is smaller than the provided value will be considered as missing residues and will be marked as gray areas in the figure, whereas a gap that is larger than the provided value will start a new figure and plot the following data in that new figure. This can help to make figures more compressed. The default gap is 200.

  • ylabel (str, optional, default=None) – y axis label. Default is “Interactions”.

  • fn (str, optional, default=None) – Figure name. By default the figure is saved as “Figure_interactions.pdf” as the current working directory.

  • title (str, optional, default=None) – Figure title.

  • fig_close (bool, optional, default=False) – Use plt.close() to close the figure. Can be used to save memory if many figures are opened.