def __init__(self, parent, id=-1, color=None, dpi=None, **kwargs): PlotPanel.__init__(self, parent, id=id, color=color, dpi=dpi, **kwargs) # Keep track of the parent Frame self.parent = parent # Internal list of plottable names (because graph # doesn't have a dictionary of handles for the plottables) self.plots = {}
def __init__(self, parent, id = -1, color = None,\ dpi = None, **kwargs): PlotPanel.__init__(self, parent, id=id, color=color, dpi=dpi, **kwargs) # Keep track of the parent Frame self.parent = parent # Internal list of plottable names (because graph # doesn't have a dictionary of handles for the plottables) self.plots = {}
def __init__(self, parent, id=-1, color=None, dpi=None, style=wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs): PlotPanel.__init__(self, parent, id=id, style=style, **kwargs) PanelBase.__init__(self, parent) ## Reference to the parent window self.parent = parent if hasattr(parent, "parent"): self.parent = self.parent.parent ## Plottables self.plots = {} self.frame = None # context menu self._slicerpop = None self._available_data = [] self._symbol_labels = self.get_symbol_label() self._color_labels = self.get_color_label() self.currColorIndex = "" self._is_changed_legend_label = False self.is_xtick = False self.is_ytick = False self.hide_menu = None ## Unique ID (from gui_manager) self.uid = None self.x_size = None ## Default locations # self._default_save_location = os.getcwd() self.size = None self.vl_ind = 0 ## Graph # self.graph = Graph() self.graph.xaxis("\\rm{Q}", 'A^{-1}') self.graph.yaxis("\\rm{Intensity} ", "cm^{-1}") self.graph.render(self) self.cursor_id = None # In resizing event self.resizing = False self.canvas.set_resizing(self.resizing) self.Bind(wx.EVT_SIZE, self._OnReSize) self.parent.SetFocus() # If true, there are 3 qrange bars self.is_corfunc = False
def __init__(self, parent, id=-1, dimension=2, color=None, dpi=None, **kwargs): """ """ PlotPanel.__init__(self, parent, id=id, color=color, dpi=dpi, **kwargs) # Keep track of the parent Frame self.parent = parent # Internal list of plottable names (because graph # doesn't have a dictionary of handles for the plottables) self.dimension = dimension self.plots = {} self.graph = Graph() # add axis labels self.graph.xaxis('\\rm{x} ', '') self.graph.yaxis('\\rm{y} ', '')
def __init__(self, parent, id= -1, is_number=False, content='?', **kwargs): """ """ PlotPanel.__init__(self, parent, id=id, **kwargs) self.is_number = is_number self.content = content self.point = None self.position = (0.4, 0.5) self.scale = 'linear' self.prevXtrans = "x" self.prevYtrans = "y" self.viewModel = "--" self.subplot.set_xticks([]) self.subplot.set_yticks([]) self.add_text() self.figure.subplots_adjust(left=0.1, bottom=0.1)
def __init__(self, d_min, d_max, parent, id=-1, color=None, dpi=None, style=wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs): """ Initialization. The parameters added to PlotPanel are: :param d_min: Minimum value of D_max to explore :param d_max: Maximum value of D_max to explore """ PlotPanel.__init__(self, parent, id=id, style=style, **kwargs) self.parent = parent self.min = d_min self.max = d_max self.npts = DEFAULT_NPTS step = (self.max - self.min) / (self.npts - 1) self.x = np.arange(self.min, self.max + step * 0.01, step) dx = np.zeros(len(self.x)) y = np.ones(len(self.x)) dy = np.zeros(len(self.x)) # Plot area self.plot = Model1D(self.x, y=y, dy=dy) self.plot.name = DEFAULT_OUTPUT self.plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM # Graph self.graph = Graph() self.graph.xaxis(r"\rm{D_{max}}", 'A') self.graph.yaxis(r"\rm{%s}" % DEFAULT_OUTPUT, "") self.graph.add(self.plot) self.graph.render(self) self.toolbar.DeleteToolByPos(0) self.toolbar.DeleteToolByPos(8) self.toolbar.Realize()
def __init__(self, d_min, d_max, parent, id= -1, color=None, \ dpi=None, style=wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs): """ Initialization. The parameters added to PlotPanel are: :param d_min: Minimum value of D_max to explore :param d_max: Maximum value of D_max to explore """ PlotPanel.__init__(self, parent, id=id, style=style, **kwargs) self.parent = parent self.min = d_min self.max = d_max self.npts = DEFAULT_NPTS step = (self.max - self.min) / (self.npts - 1) self.x = np.arange(self.min, self.max + step * 0.01, step) dx = np.zeros(len(self.x)) y = np.ones(len(self.x)) dy = np.zeros(len(self.x)) # Plot area self.plot = Model1D(self.x, y=y, dy=dy) self.plot.name = DEFAULT_OUTPUT self.plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM # Graph self.graph = Graph() self.graph.xaxis("\\rm{D_{max}}", 'A') self.graph.yaxis("\\rm{%s}" % DEFAULT_OUTPUT, "") self.graph.add(self.plot) self.graph.render(self) self.toolbar.DeleteToolByPos(0) self.toolbar.DeleteToolByPos(8) self.toolbar.Realize()