Esempio n. 1
0
    def __init__(self, x, y, text=None, bbox=None):
        PlotInfo.__init__(self, "label")

        self.x = x
        """
        The label's x coordinate
        """

        self.y = y
        """
        The label's y coordinate
        """

        self.text = text
        """
        The text that should be displayed with the label
        """

        self.textX = x

        self.textY = y

        self.arrow = None

        self._marker = Marker()

        self._labelProperties = LabelProperties()

        if bbox:
            self.bbox = dict(bbox)
        else:
            self.bbox = None
 def setMapStyle(self):
     layers = self.iface.legendInterface().layers()
     self.scrc = SymbolCategoryRenderClass(
         self.makeokdict(self.getTabs(csv=True)))
     self.labProp = LabelProperties(self.okdict)
     for layer in layers:
         layerType = layer.type()
         if layerType == QgsMapLayer.VectorLayer:
             node = len(layers)
             if layer.name() == u'LAYER3-polygon':
                 self.reorderLayers(layer, node)
             if layer.name() == u'LAYER7-polygon':
                 self.reorderLayers(layer, node - 1)
             if layer.name() == u'LAYER12-polygon':
                 self.reorderLayers(layer, node - 2)
             if layer.name() == u'LAYER19-polygon':
                 self.reorderLayers(layer, node - 3)
             if layer.name() == u'LAYER17-label':
                 self.labProp.makeLabels(layer)
             self.scrc.CategoryRender(self.style, layer)
         layer.triggerRepaint()
Esempio n. 3
0
 def __init__(self):
     self._formatter = None
     self.labels = None
     self.labelPoints = None
     self._properties = LabelProperties()
     self.size = None
Esempio n. 4
0
    def __init__(self):
        self.plots = []

        self.title = None
        """
        The plot's title (will be centered above the axes themselves)
        """

        self.xFormatter = None
        self.yFormatter = None

        self.yLabel = None
        """
        The label for the plot's y-axis
        """

        self.xLabel = None
        """
        The label for the plot's x-axis
        """

        self._xLabelProperties = LabelProperties()
        self._yLabelProperties = LabelProperties()

        self.legend = None

        self._xLimits = None
        self._yLimits = None

        self.twinxLabel = None
        self.twinxIndex = -1
        self.twinxLimits = None

        self.lineStyles = None
        self.lineColors = None
        self.markers = None

        self.width = None

        self.height = None

        self.dpi = 100

        self.plotParams = None

        self.logx = False
        """
        If true, this plot's x-axis will be drawn in log scale.
        """

        self.logy = False
        """
        If true, this plot's y-axis will be drawn in log scale.
        """

        self.loglog = False
        """
        If true, both this plot's axes will be drawn in log scale.
        """

        self.logbase = 10
        """
        The base of the logarithm used to draw log scale axes.
        """

        self.logbasex = None
        """
        The base of the logarithm used to draw the x-axis. Overrides `logbase`,
        and only takes effect if logx or loglog are True.
        """

        self.logbasey = None
        """
        The base of the logarithm used to draw the y-axis. Overrides `logbase`,
        and only takes effect if logy or loglog are True.
        """

        self._grid = Grid()
        self._grid.visible = False

        self.insets = []

        self.hideTicks = False
        """
        If True, this plot's tick labels are hidden.
        """

        self.titleSize = None
        """
        The size of the text used for plot title.
        """

        self.latex = False

        self.axesLabelSize = None
        """
        The size of the text used for labeling the x and y axes.
        """

        self.xTickLabelSize = None
        """
        The size of the text used for x-axis tick labels
        """

        self.yTickLabelSize = None
        """
        The size of the text used for y-axis tick labels
        """

        self.titleProperties = LabelProperties()

        self.tight = False
        """
        If True, this plot is auto-scaled so that axis labels don't get cut off.
        """

        self.allows_tight = True

        self.projection = None
        """