Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(27)  |  Call(23)  |  Derive(0)  |  Import(4)

src/o/r/orange3-HEAD/Orange/widgets/visualize/owscatterplotgraph.py   orange3(Download)
    SELECTION_TOGGLE, xBottom, yLeft, yRight, xTop, OWLegendGradient, move_item_xy, OWLegendTitle
import Orange
from Orange.widgets.utils.scaling import get_variable_values_sorted, ScaleScatterPlotData
import pyqtgraph as pg
from pyqtgraph.graphicsItems.ScatterPlotItem import SpotItem
            xmin = xVarMin - (self.jitter_size + 10.)/100.
            xmax = xVarMax + (self.jitter_size + 10.)/100.
            labels = get_variable_values_sorted(self.data_domain[xAttrIndex])
        else:
            off  = (xVarMax - xVarMin) * (self.jitter_size * self.jitter_continuous + 2) / 100.0
            ymin = yVarMin - (self.jitter_size + 10.)/100.
            ymax = yVarMax + (self.jitter_size + 10.)/100.
            labels = get_variable_values_sorted(self.data_domain[yAttrIndex])
        else:
            off  = (yVarMax - yVarMin) * (self.jitter_size * self.jitter_continuous + 2) / 100.0
        if self.showProbabilities and colorIndex >= 0 and self.data_domain[colorIndex].var_type in [Orange.data.Variable.VarTypes.Discrete, Orange.data.Variable.VarTypes.Continuous]:
            if self.data_domain[colorIndex].var_type == Orange.data.Variable.VarTypes.Discrete:
                domain = Orange.data.Domain([self.data_domain[xAttrIndex], self.data_domain[yAttrIndex], DiscreteVariable(self.attribute_names[colorIndex], values = get_variable_values_sorted(self.data_domain[colorIndex]))])
            else:
                domain = Orange.Domain([self.data_domain[xAttrIndex], self.data_domain[yAttrIndex], ContinuousVariable(self.attributeNames[colorIndex])])
            index = max(discColorIndex, discShapeIndex, discSizeIndex)
            num = len(self.data_domain[index].values)
            varValues = get_variable_values_sorted(self.data_domain[index])
            for ind in range(num):
                # construct an item to pass to ItemSample

src/o/r/orange3-HEAD/Orange/widgets/visualize/owparallelgraph.py   orange3(Download)
from Orange.widgets.utils.plot import OWPlot, UserAxis, AxisStart, AxisEnd, OWCurve, OWPoint, PolygonCurve, \
    xBottom, yLeft
from Orange.widgets.utils.scaling import get_variable_values_sorted, ScaleData
 
VarTypes = Variable.VarTypes
                    self.set_axis_scale(axis_id, self.attr_values[attr.name][0], self.attr_values[attr.name][1])
                elif attr.var_type == VarTypes.Discrete:
                    attribute_values = get_variable_values_sorted(self.data_domain[self.attributes[i]])
                    attr_len = len(attribute_values)
                    values = [float(1.0 + 2.0 * j) / float(2 * attr_len) for j in range(len(attribute_values))]
    def draw_legend(self):
        if self.data_has_class:
            if self.data_domain.class_var.var_type == VarTypes.Discrete:
                self.legend().clear()
                values = get_variable_values_sorted(self.data_domain.class_var)
                else:
                    curr = []
                    class_values = get_variable_values_sorted(self.data_domain.class_var)
                    for c in range(len(class_values)):
                        attr_values = self.scaled_data[attr_idx, self.original_data[self.data_class_index] == c]
 
        max_count = max([contingency.max() for contingency in self.domain_contingencies.values()] or [1])
        sorted_class_values = get_variable_values_sorted(self.data_domain.class_var)
 
        for axis_idx, attr_idx in enumerate(self.attribute_indices):

src/o/r/orange3-HEAD/Orange/widgets/visualize/owmosaic.py   orange3(Download)
from Orange.widgets.settings import DomainContextHandler
from Orange.widgets.utils import getHtmlCompatibleString
from Orange.widgets.utils.scaling import get_variable_values_sorted
from Orange.widgets.widget import OWWidget, Default
 
            dlg = SortAttributeValuesDlg(attr,
                                         self.manualAttributeValuesDict.get(attr, None) or get_variable_values_sorted(
                                             self.data.domain[attr]))
            if dlg.exec_() == QDialog.Accepted:
                self.manualAttributeValuesDict[attr] = [str(dlg.attributeList.item(i).text()) for i in
        attr = attrList[0]
        edge = len(attrList) * self.cellspace  # how much smaller rectangles do we draw
        values = self.attributeValuesDict.get(attr, None) or get_variable_values_sorted(self.data.domain[attr])
        if side % 2: values = values[::-1]  # reverse names if necessary
 
        if len(attrList + usedAttrs) == 4 and len(usedAttrs) == 2:
            attr1Values = self.attributeValuesDict.get(usedAttrs[0], None) or get_variable_values_sorted(
                self.data.domain[usedAttrs[0]])
            if usedVals[0] == attr1Values[-1]:
                valRange = valRange[::-1]
        if side == RIGHT:
            attr1Values = self.attributeValuesDict.get(usedAttrs[0], None) or get_variable_values_sorted(
                self.data.domain[usedAttrs[0]])
            if usedVals[0] != attr1Values[-1]:
                return

src/o/r/orange3-HEAD/Orange/widgets/utils/plot/owtools.py   orange3(Download)
from PyQt4.QtCore import Qt, QRectF, QPointF, QPropertyAnimation, qVersion
from Orange.widgets.utils.colorpalette import ColorPaletteDlg
from Orange.widgets.utils.scaling import get_variable_values_sorted
 
from .owcurve import *
            imagebmp, nShades = orangeom.potentialsBitmap(self.classifier, rx, ry, ox, oy, self.granularity, self.scale, self.spacing)
            palette = []
            sortedClasses = get_variable_values_sorted(self.classifier.domain.classVar)
            for cls in self.classifier.classVar.values:
                color = self.plot().discPalette.getRGB(sortedClasses.index(cls))