コード例 #1
0
ファイル: test_panel2D.py プロジェクト: diffpy/srfit-sasview
    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 = {}
コード例 #2
0
    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 = {}
コード例 #3
0
ファイル: masking.py プロジェクト: diffpy/srfit-sasview
    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} ', '')
コード例 #4
0
 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)
コード例 #5
0
ファイル: data_operator.py プロジェクト: diffpy/srfit-sasview
 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)
コード例 #6
0
ファイル: masking.py プロジェクト: mcbeaker/sasview
    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} ', '')
コード例 #7
0
    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 = numpy.arange(self.min, self.max + step * 0.01, step)
        dx = numpy.zeros(len(self.x))
        y = numpy.ones(len(self.x))
        dy = numpy.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()
コード例 #8
0
    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 = numpy.arange(self.min, self.max + step * 0.01, step)
        dx = numpy.zeros(len(self.x))
        y = numpy.ones(len(self.x))
        dy = numpy.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()