def __init__(self, parent=None): """ Initialization :return: """ # self._myParentWindow = parent # Initialize the figure self._myFigure = Figure() # Init canvas FigureCanvas.__init__(self, self._myFigure) FigureCanvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvas.updateGeometry(self) # Axes self._myAxes = Axes3D( self._myFigure) # Canvas figure must be created for mouse rotation self.format_coord_org = self._myAxes.format_coord self._myAxes.format_coord = self.report_pixel # color self._colorMap = [0.5, 0.5, 0.5] # Others self._dataKey = 0 self._dataDict = dict() # List of plots on canvas NOW self._currPlotList = list() self._currSurfaceList = list() # [{"xx":,"yy:","val:"}] return
def __init__(self, parent): self._driver = AddieDriver() # from mpl_toolkits.axes_grid1 import host_subplot # import mpl_toolkits.axisartist as AA # import matplotlib.pyplot as plt # Instantiating matplotlib Figure self.fig = Figure() self.fig.patch.set_facecolor('white') self.axes = self.fig.add_subplot(111, projection='mantid') self.fig.subplots_adjust(bottom=0.15) # Initialize parent class and set parent FigureCanvasQTAgg.__init__(self, self.fig) self.setParent(parent) # Set size policy to be able to expanding and resizable with frame FigureCanvasQTAgg.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvasQTAgg.updateGeometry(self) # Variables to manage all lines/subplot self._lineDict = {} self._lineIndex = 0 # legend and color bar self._colorBar = None self._isLegendOn = False self._legendFontSize = 10
def __init__(self, parent): """ Initialization """ # Instantiating matplotlib Figure self.fig = Figure() self.fig.patch.set_facecolor('white') self.axes = self.fig.add_subplot( 111) # return: matplotlib.axes.AxesSubplot # Initialize parent class and set parent FigureCanvas.__init__(self, self.fig) self.setParent(parent) # Set size policy to be able to expanding and resizable with frame FigureCanvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvas.updateGeometry(self) # legend and color bar self._colorBar = None # Buffer of data self._currentArray2D = None # image management data structure self._currIndex = 0 self._imagePlotDict = dict() # image size self._xLimit = [0., 1.] self._yLimit = [0., 1.] return
def __init__(self, parent=None): """ Initialization :return: """ # self._myParentWindow = parent # Initialize the figure self._myFigure = Figure() # Init canvas FigureCanvas.__init__(self, self._myFigure) FigureCanvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvas.updateGeometry(self) # Axes self._myAxes = Axes3D(self._myFigure) # Canvas figure must be created for mouse rotation self.format_coord_org = self._myAxes.format_coord self._myAxes.format_coord = self.report_pixel # color self._colorMap = [0.5, 0.5, 0.5] # Others self._dataKey = 0 self._dataDict = dict() # List of plots on canvas NOW self._currPlotList = list() self._currSurfaceList = list() # [{"xx":,"yy:","val:"}] return
def __init__(self, parent): """ Initialization """ # Instantiating matplotlib Figure self.fig = Figure() self.fig.patch.set_facecolor('white') # initialization super(Qt4Mpl2DCanvas, self).__init__(self.fig) # set up axis/subplot (111) only for 2D self.axes = self.fig.add_subplot( 111, polar=False) # return: matplotlib.axes.AxesSubplot self.axes.set_aspect('auto') # plot management self._scatterPlot = None self._imagePlot = None # Initialize parent class and set parent FigureCanvas.__init__(self, self.fig) self.setParent(parent) # Set size policy to be able to expanding and resizable with frame FigureCanvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding) FigureCanvas.updateGeometry(self) # Variables to manage all lines/subplot self._lineDict = {} self._lineIndex = 0 # legend and color bar self._colorBar = None self._isLegendOn = False self._legendFontSize = 8 return