Module pyspecan.controller.CUI.plot_base
Classes
class CUIPlot (parent, fig, plotter=pyspecan.backend.mpl.plot.Plot)-
Expand source code
class CUIPlot: def __init__(self, parent, fig, plotter=Plot): self.parent = parent self.plotter = plotter(fig) @property def fig(self): return self.plotter.fig def ax(self, name): return self.plotter.ax(name) def add_ax(self, *args, **kwargs): return self.plotter.add_ax(*args,**kwargs)Subclasses
Instance variables
prop fig-
Expand source code
@property def fig(self): return self.plotter.fig
Methods
def add_ax(self, *args, **kwargs)-
Expand source code
def add_ax(self, *args, **kwargs): return self.plotter.add_ax(*args,**kwargs) def ax(self, name)-
Expand source code
def ax(self, name): return self.plotter.ax(name)
class PSD (parent)-
Expand source code
class PSD(CUIPlot): def __init__(self, parent): fig = plt.figure(figsize=(5,5), layout="constrained") super().__init__(parent, fig) self.plotter.add_ax("psd", fig.add_subplot()) def plot(self, freq, psd): self.ax("psd").ax.set_title("PSD") self.ax("psd").plot(freq, psd, name="psd", color="y") def show(self): self.plotter.fig.show()Ancestors
Methods
def plot(self, freq, psd)-
Expand source code
def plot(self, freq, psd): self.ax("psd").ax.set_title("PSD") self.ax("psd").plot(freq, psd, name="psd", color="y") def show(self)-
Expand source code
def show(self): self.plotter.fig.show()