Beispiel #1
0
    def CreatePlotList(self):
        """Make list of elements to plot
        """
        # graph the cell value, frequency pairs for the histogram
        self.plotlist = []

        for rpair in self.rasterList:
            if 'datalist' not in self.raster[rpair] or \
                    self.raster[rpair]['datalist'] is None:
                continue

            if len(self.raster[rpair]['datalist']) > 0:
                col = wx.Colour(self.raster[rpair]['pcolor'][0],
                                self.raster[rpair]['pcolor'][1],
                                self.raster[rpair]['pcolor'][2],
                                255)
                scatterpoints = plot.PolyMarker(
                    self.raster[rpair]['datalist'],
                    legend=' ' + self.raster[rpair]['plegend'],
                    colour=col, size=self.raster[rpair]['psize'],
                    fillstyle=self.ptfilldict[self.raster[rpair]['pfill']],
                    marker=self.raster[rpair]['ptype'])

                self.plotlist.append(scatterpoints)

        return self.plotlist
Beispiel #2
0
    def CreatePlotList(self):
        """Create a plot data list from transect datalist and
            transect segment endpoint coordinates.
        """
        # graph the distance, value pairs for the transect
        self.plotlist = []

        # Add segment marker points to plot data list
        if len(self.seglist) > 0:
            self.ppoints = plot.PolyMarker(
                self.seglist,
                legend=' ' + self.properties['marker']['legend'],
                colour=wx.Colour(
                    self.properties['marker']['color'][0],
                    self.properties['marker']['color'][1],
                    self.properties['marker']['color'][2],
                    255),
                size=self.properties['marker']['size'],
                fillstyle=self.ptfilldict[
                    self.properties['marker']['fill']],
                marker=self.properties['marker']['type'])
            self.plotlist.append(self.ppoints)

        # Add profile distance/elevation pairs to plot data list for each
        # raster profiled
        for r in self.rasterList:
            col = wx.Colour(self.raster[r]['pcolor'][0],
                            self.raster[r]['pcolor'][1],
                            self.raster[r]['pcolor'][2],
                            255)
            self.raster[r]['pline'] = plot.PolyLine(
                self.raster[r]['datalist'],
                colour=col, width=self.raster[r]['pwidth'],
                style=self.linestyledict[self.raster[r]['pstyle']],
                legend=self.raster[r]['plegend'])

            self.plotlist.append(self.raster[r]['pline'])

        if len(self.plotlist) > 0:
            return self.plotlist
        else:
            return None