def graph(self, yrange=(0.0, 1.0), title=None, wxnoserver=False): """ Opens a grapher window to control the shape of the envelope. When editing the grapher with the mouse, the new set of points will be send to the object on mouse up. Ctrl+C with focus on the grapher will copy the list of points to the clipboard, giving an easy way to insert the new shape in a script. Parameters: yrange : tuple, optional Set the min and max values of the Y axis of the graph. Defaults to (0.0, 1.0). title : string, optional Title of the window. If none is provided, the name of the class is used. wxnoserver : boolean, optional With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window and not to wait for it before showing the controller window. Defaults to False. """ createGraphWindow(self, 1, self._size, yrange, title, wxnoserver)
def graph(self, xlen=None, yrange=None, title=None, wxnoserver=False): """ Opens a grapher window to control the shape of the envelope. When editing the grapher with the mouse, the new set of points will be send to the object on mouse up. Ctrl+C with focus on the grapher will copy the list of points to the clipboard, giving an easy way to insert the new shape in a script. :Args: xlen : float, optional Set the maximum value of the X axis of the graph. If None, the maximum value is retrieve from the current list of points. Defaults to None. yrange : tuple, optional Set the min and max values of the Y axis of the graph. If None, min and max are retrieve from the current list of points. Defaults to None. title : string, optional Title of the window. If none is provided, the name of the class is used. wxnoserver : boolean, optional With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window. If `wxnoserver` is set to True, the interpreter will not wait for the server GUI before showing the controller window. """ if xlen == None: xlen = float(self._list[-1][0]) else: xlen = float(xlen) if yrange == None: ymin = float(min([x[1] for x in self._list])) ymax = float(max([x[1] for x in self._list])) if ymin == ymax: yrange = (0, ymax) else: yrange = (ymin, ymax) createGraphWindow(self, 2, xlen, yrange, title, wxnoserver)