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

All Samples(8)  |  Call(7)  |  Derive(0)  |  Import(1)

src/o/r/orange3-HEAD/Orange/widgets/visualize/owsieve.py   orange3(Download)
from Orange.statistics.contingency import get_contingency
from Orange.widgets.utils import getHtmlCompatibleString
from Orange.widgets.visualize.owmosaic import OWCanvasText, OWCanvasRectangle, OWCanvasEllipse, OWCanvasLine
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QColor, QPen, QBrush, QDialog, QApplication
from Orange.data import Table, Variable
 
        # get text width of Y attribute name
        text = OWCanvasText(self.canvas, data.domain[self.attrY].name, x  = 0, y = 0, bold = 1, show = 0)
        xOff = int(text.boundingRect().width() + 40)
        yOff = 50
        else:
            name = "<b>P(%s, %s | %s = %s) &#8800; P(%s | %s = %s)&times;P(%s | %s = %s)</b>" %(self.attrX, self.attrY, self.attrCondition, getHtmlCompatibleString(self.attrConditionValue), self.attrX, self.attrCondition, getHtmlCompatibleString(self.attrConditionValue), self.attrY, self.attrCondition, getHtmlCompatibleString(self.attrConditionValue))
        OWCanvasText(self.canvas, "" , xOff+ sqareSize/2, 20, Qt.AlignCenter, htmlText = name)
        OWCanvasText(self.canvas, "N = " + str(len(data)), xOff+ sqareSize/2, 38, Qt.AlignCenter, bold = 0)
 
                currY += height
                if currX == xOff:
                    OWCanvasText(self.canvas, "", xOff - 10, currY - height/2, Qt.AlignRight | Qt.AlignVCenter, htmlText = getHtmlCompatibleString(data.domain[self.attrY].values[j]))
 
            OWCanvasText(self.canvas, "", currX + width/2, yOff + sqareSize + 5, Qt.AlignCenter, htmlText = getHtmlCompatibleString(data.domain[self.attrX].values[i]))