def plot(self, filename=None):
        import gist

        gist.window(self.id, wait=1, style=self.style)
        gist.pltitle(self.title)
        gist.animate(1)

        if self.limits != None:
            gist.limits(self._getLimit('xmin'), self._getLimit('xmax'),
                        self._getLimit(('datamin', 'ymin')),
                        self._getLimit(('datamax', 'ymax')))

        self._plotArrays()

        _GistViewer.plot(self, filename=filename)
Пример #2
0
    def plot(self, filename = None):
        import gist

        gist.window(self.id, wait = 1, style = self.style)
        gist.pltitle(self.title)
        gist.animate(1)

        if self.limits != None:
            gist.limits(self._getLimit('xmin'), 
                        self._getLimit('xmax'), 
                        self._getLimit(('datamin', 'ymin')), 
                        self._getLimit(('datamax', 'ymax')))
            
        self._plotArrays()
            
        _GistViewer.plot(self, filename = filename)
Пример #3
0
    def plot(self, filename=None):
        """
        Plot the `CellVariable` as a contour plot.
        """
        self._plot()

        datamin = self._getLimit(('datamin', 'zmin'))
        datamax = self._getLimit(('datamax', 'zmax'))

        if datamin == 'e':
            datamin = None

        if datamax == 'e':
            datamax = None

        datamin, datamax = self._autoscale(vars=self.vars,
                                           datamin=datamin,
                                           datamax=datamax)

        if datamax == datamin:
            datamax = datamin + 1e-10

        vertexIDs = self.mesh._orderedCellVertexIDs

        vertexCoords = self.mesh.vertexCoords

        xCoords = numerix.take(vertexCoords[0], vertexIDs).flatten("FORTRAN")
        yCoords = numerix.take(vertexCoords[1], vertexIDs).flatten("FORTRAN")

        import gist

        import Numeric
        gist.plfp(Numeric.array(numerix.array(self.vars[0])),
                  yCoords,
                  xCoords,
                  self.mesh._numberOfFacesPerCell,
                  cmin=datamin,
                  cmax=datamax)

        import fipy.viewers.gistViewer.colorbar

        colorbar._color_bar(minz=datamin,
                            maxz=datamax,
                            ncol=240,
                            zlabel=self.vars[0].name)

        _GistViewer.plot(self, filename=filename)
Пример #4
0
    def plot(self, filename = None):
        """
        Plot the `CellVariable` as a contour plot.
        """
        self._plot()

        datamin = self._getLimit(('datamin', 'zmin'))
        datamax = self._getLimit(('datamax', 'zmax'))
        
        if datamin == 'e':
            datamin = None
        
        if datamax == 'e':
            datamax = None
            
        datamin, datamax = self._autoscale(vars=self.vars,
                                           datamin=datamin,
                                           datamax=datamax)

        if datamax == datamin:
            datamax = datamin + 1e-10

        vertexIDs = self.mesh._orderedCellVertexIDs

        vertexCoords = self.mesh.vertexCoords

        xCoords = numerix.take(vertexCoords[0], vertexIDs).flatten("FORTRAN")
        yCoords = numerix.take(vertexCoords[1], vertexIDs).flatten("FORTRAN")

        import gist

        import Numeric
        gist.plfp(Numeric.array(numerix.array(self.vars[0])), yCoords, xCoords, self.mesh._numberOfFacesPerCell, cmin=datamin, cmax=datamax)

        import fipy.viewers.gistViewer.colorbar

        colorbar._color_bar(minz=datamin, maxz=datamax, ncol=240, zlabel=self.vars[0].name)

        _GistViewer.plot(self, filename = filename)