Proportions

class mesmerize.plotting.ProportionsWidget[source]

Bases: mesmerize.plotting.widgets.base.BasePlotWidget, mesmerize.pyqtgraphCore.widgets.MatplotlibWidget.MatplotlibWidget

drop_opts = ['xs', 'ys']

Drop the ‘xs’ and ‘ys’ since they are pd.Series objects and not required for restoring the plot

get_plot_opts(drop: bool = False)[source]

Get the plot options

Parameters:drop – Drop the ‘xs’ and ‘ys’ objects when saving the returned dict for saving to an hdf5 file
update_plot()[source]

Update the plot data and draw

export(*args, **kwargs)[source]

Export as a csv file

open_plot(ptrn_path: str, proj_path: str) → Optional[Tuple[str, str]]

Open a plot saved by the save_plot() method

Parameters:
  • ptrn_path – Path to the HDF5 Transmission file. By convention file extension is “.ptrn”
  • proj_path – Project path of the associated plot data.
open_plot_dialog(filepath, dirpath, *args, **kwargs)

Open plot dialog

save_plot(path)

Save the plot as a Transmission in an HDF5 file. Plot parameters are stored as a JSON string within the HDF5 file. See Transmission.to_hdf5

Parameters:path – Path to save the file to. For easy identification use “.ptrn” extension.
save_plot_dialog(path, *args)

Plot save dialog

transmission

The input transmission

Return type:Transmission