Changeset 8363:e185adc25e0e in orange
- Timestamp:
- 07/06/11 10:38:43 (23 months ago)
- Branch:
- default
- Convert:
- 98dad152de2d46965059dd63c5627272d6c6246c
- Location:
- orange/OrangeWidgets
- Files:
-
- 10 deleted
- 6 edited
-
Graph/__init__.py (deleted)
-
Graph/axis.py (deleted)
-
Graph/constants.py (deleted)
-
Graph/curve.py (deleted)
-
Graph/item.py (deleted)
-
Graph/legend.py (deleted)
-
Graph/palette.py (deleted)
-
Graph/point.py (deleted)
-
Graph/tools.py (deleted)
-
OWGraphQt.py (deleted)
-
OWkNNOptimization.py (modified) (13 diffs)
-
Prototypes/OWDiscretizeQt.py (modified) (8 diffs)
-
Prototypes/OWDistributionsQt.py (modified) (7 diffs)
-
Prototypes/OWLinProjGraphQt.py (modified) (14 diffs)
-
Prototypes/OWScatterPlotGraphQt.py (modified) (9 diffs)
-
Prototypes/OWScatterPlotQt.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
orange/OrangeWidgets/OWkNNOptimization.py
r8342 r8363 1 1 from OWWidget import * 2 2 import OWGUI, OWDlgs, numpy, user, sys 3 from Graph.tools import *4 from OWGraphQt import *3 from plot.owtools import * 4 from plot.owplot import * 5 5 from orngVizRank import * 6 6 from orngScaleData import getVariableValuesSorted … … 634 634 def attributeAnalysis(self): 635 635 if not self.attributeHistogramDlg: 636 self.attributeHistogramDlg = OW GraphAttributeHistogram(self, VIZRANK_POINT, signalManager = self.signalManager)636 self.attributeHistogramDlg = OWPlotAttributeHistogram(self, VIZRANK_POINT, signalManager = self.signalManager) 637 637 self.attributeHistogramDlg.show() 638 638 self.attributeHistogramDlg.setResults(self.graph.rawData, self.shownResults) 639 639 640 640 def graphProjectionQuality(self): 641 dialog = OW GraphProjectionQuality(self, VIZRANK_POINT, signalManager = self.signalManager)641 dialog = OWPlotProjectionQuality(self, VIZRANK_POINT, signalManager = self.signalManager) 642 642 dialog.show() 643 643 dialog.setResults(self.results) … … 645 645 def identifyOutliers(self): 646 646 if not self.identifyOutliersDlg: 647 self.identifyOutliersDlg = OW GraphIdentifyOutliers(self, VIZRANK_POINT, signalManager = self.signalManager, widget = self.parentWidget)647 self.identifyOutliersDlg = OWPlotIdentifyOutliers(self, VIZRANK_POINT, signalManager = self.signalManager, widget = self.parentWidget) 648 648 self.identifyOutliersDlg.show() 649 649 self.identifyOutliersDlg.setResults(self.graph.rawData, self.shownResults) … … 842 842 self.useGeneSets = 0 843 843 844 self.graph = OW Graph(self.mainArea)844 self.graph = OWPlot(self.mainArea) 845 845 self.mainArea.layout().addWidget(self.graph) 846 846 … … 1088 1088 1089 1089 """ 1090 Commented out to be compatible with Qt-only OW Graph1091 self.graph.setAxisScaleDraw(QwtPlot.xBottom, OW GraphTools.DiscreteAxisScaleDraw(attributes))1090 Commented out to be compatible with Qt-only OWPlot 1091 self.graph.setAxisScaleDraw(QwtPlot.xBottom, OWPlotTools.DiscreteAxisScaleDraw(attributes)) 1092 1092 self.graph.axisScaleDraw(QwtPlot.xBottom).enableComponent(QwtScaleDraw.Ticks, 0) 1093 1093 self.graph.axisScaleDraw(QwtPlot.xBottom).enableComponent(QwtScaleDraw.Backbone, 0) … … 1099 1099 self.graph.axisScaleDraw(QwtPlot.xBottom).setLabelAlignment(Qt.AlignLeft) 1100 1100 1101 self.graph.setAxisScaleDraw(QwtPlot.yLeft, OW GraphTools.DiscreteAxisScaleDraw([""] + attributes[::-1]))1101 self.graph.setAxisScaleDraw(QwtPlot.yLeft, OWPlotTools.DiscreteAxisScaleDraw([""] + attributes[::-1])) 1102 1102 self.graph.axisScaleDraw(QwtPlot.yLeft).enableComponent(QwtScaleDraw.Ticks, 0) 1103 1103 self.graph.axisScaleDraw(QwtPlot.yLeft).enableComponent(QwtScaleDraw.Backbone, 0) … … 1118 1118 1119 1119 1120 class OW GraphAttributeHistogram(OWWidget):1120 class OWPlotAttributeHistogram(OWWidget): 1121 1121 settingsList = ["attributeCount", "projectionCount", "rotateXAttributes", "colorAttributes", "progressLines", "useGeneSets", "recentGeneSets"] 1122 1122 def __init__(self, parent=None, dialogType=VIZRANK_POINT, signalManager = None): … … 1131 1131 self.evaluatedAttributesByClass = None 1132 1132 1133 self.graph = OW Graph(self.mainArea)1133 self.graph = OWPlot(self.mainArea) 1134 1134 self.mainArea.layout().addWidget(self.graph) 1135 1135 … … 1319 1319 # ############################################################################# 1320 1320 # draw a graph for all the evaluated projections that shows how is the classification accuracy falling when we are moving from the best to the worst evaluated projections 1321 class OW GraphProjectionQuality(OWWidget):1321 class OWPlotProjectionQuality(OWWidget): 1322 1322 def __init__(self,parent=None, dialogType = VIZRANK_POINT, signalManager = None): 1323 1323 OWWidget.__init__(self, parent, signalManager, "Projection Quality", wantGraph = 1) … … 1339 1339 self.controlArea.layout().addStretch(100) 1340 1340 1341 self.graph = OW Graph(self.mainArea)1341 self.graph = OWPlot(self.mainArea) 1342 1342 self.mainArea.layout().addWidget(self.graph) 1343 1343 self.graph.showXaxisTitle = 1 … … 1421 1421 # ############################################################################# 1422 1422 # draw a graph for all the evaluated projections that shows how is the classification accuracy falling when we are moving from the best to the worst evaluated projections 1423 class OW GraphIdentifyOutliers(VizRankOutliers, OWWidget):1423 class OWPlotIdentifyOutliers(VizRankOutliers, OWWidget): 1424 1424 settingsList = ["projectionCountList", "showLegend", "showAllClasses", "sortProjections", "showClickedProjection"] 1425 1425 def __init__(self, vizrank, dialogType, signalManager = None, widget = None): … … 1460 1460 self.exampleList.setToolTip("Average probabilities of correct classification and indices of corresponding examples") 1461 1461 1462 self.graph = OW Graph(self.mainArea)1462 self.graph = OWPlot(self.mainArea) 1463 1463 self.mainArea.layout().addWidget(self.graph) 1464 1464 self.graph.showXaxisTitle = 1 … … 1720 1720 ow=OWVizRank() 1721 1721 ## ow = OWInteractionAnalysis() 1722 ## ow = OW GraphAttributeHistogram()1722 ## ow = OWPlotAttributeHistogram() 1723 1723 ow.show() 1724 1724 a.exec_() -
orange/OrangeWidgets/Prototypes/OWDiscretizeQt.py
r8342 r8363 8 8 import orange 9 9 from OWWidget import * 10 from OWGraphQt import * 10 from plot.owplot import * 11 from plot.owcurve import * 11 12 import OWGUI 12 from Graph.curve import *13 13 import math 14 14 … … 17 17 return [low+i*inc for i in range(steps)] 18 18 19 class DiscGraph(OW Graph):19 class DiscGraph(OWPlot): 20 20 def __init__(self, master, *args): 21 OW Graph.__init__(self, *args)21 OWPlot.__init__(self, *args) 22 22 self.master=master 23 23 … … 158 158 159 159 for val, freq in freqhigh: 160 c = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = Curve.NoSymbol, xData = [val, val], yData = [1.0, 1.0 - max(.02, freqfac * freq)], autoScale = 1)160 c = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = [val, val], yData = [1.0, 1.0 - max(.02, freqfac * freq)], autoScale = 1) 161 161 c.setYAxis(yRight) 162 162 self.rugKeys.append(c) 163 163 164 164 for val, freq in freqlow: 165 c = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = Curve.NoSymbol, xData = [val, val], yData = [0.04, 0.04 + max(.02, freqfac * freq)], autoScale = 1)165 c = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = [val, val], yData = [0.04, 0.04 + max(.02, freqfac * freq)], autoScale = 1) 166 166 c.setYAxis(yRight) 167 167 self.rugKeys.append(c) … … 182 182 self.baseCurveX, self.baseCurveY = self.computeAddedScore(list(self.curCutPoints)) 183 183 184 self.baseCurveKey = self.addCurve("", Qt.black, Qt.black, 1, style = Qt.SolidLine, symbol = Curve.NoSymbol, xData = self.baseCurveX, yData = self.baseCurveY, lineWidth = 2, autoScale = 1)184 self.baseCurveKey = self.addCurve("", Qt.black, Qt.black, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = self.baseCurveX, yData = self.baseCurveY, lineWidth = 2, autoScale = 1) 185 185 self.baseCurveKey.setYAxis(yLeft) 186 186 … … 195 195 196 196 if self.lookaheadCurveX and self.master.showLookaheadLine: 197 self.lookaheadCurveKey = self.addCurve("", Qt.black, Qt.black, 1, style = Qt.SolidLine, symbol = Curve.NoSymbol, xData = self.lookaheadCurveX, yData = self.lookaheadCurveY, lineWidth = 1, autoScale = 1)197 self.lookaheadCurveKey = self.addCurve("", Qt.black, Qt.black, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = self.lookaheadCurveX, yData = self.lookaheadCurveY, lineWidth = 1, autoScale = 1) 198 198 self.lookaheadCurveKey.setYAxis(yLeft) 199 199 #self.lookaheadCurveKey.setVisible(1) … … 210 210 if self.contingency and self.condProb and self.master.showTargetClassProb: 211 211 xData = self.contingency.keys()[1:-1] 212 self.probCurveKey = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = Curve.NoSymbol, xData = xData, yData = [self.condProb(x)[self.master.targetClass] for x in xData], lineWidth = 2, autoScale = 1)212 self.probCurveKey = self.addCurve("", Qt.gray, Qt.gray, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = xData, yData = [self.condProb(x)[self.master.targetClass] for x in xData], lineWidth = 2, autoScale = 1) 213 213 self.probCurveKey.setYAxis(yRight) 214 214 … … 226 226 227 227 for cut in self.curCutPoints: 228 c = self.addCurve("", Qt.blue, Qt.blue, 1, style = Qt.DashLine, symbol = Curve.NoSymbol, xData = [cut, cut], yData = [.9, 0.1], autoScale = 1)228 c = self.addCurve("", Qt.blue, Qt.blue, 1, style = Qt.DashLine, symbol = OWCurve.NoSymbol, xData = [cut, cut], yData = [.9, 0.1], autoScale = 1) 229 229 c.setYAxis(yRight) 230 230 self.cutLineKeys.append(c) … … 256 256 def addCutPoint(self, cut): 257 257 self.curCutPoints.append(cut) 258 c = self.addCurve("", Qt.blue, Qt.blue, 1, style = Qt.DashLine, symbol = Curve.NoSymbol, xData = [cut, cut], yData = [1.0, 0.015], autoScale = 1)258 c = self.addCurve("", Qt.blue, Qt.blue, 1, style = Qt.DashLine, symbol = OWCurve.NoSymbol, xData = [cut, cut], yData = [1.0, 0.015], autoScale = 1) 259 259 c.setYAxis(yRight) 260 260 self.cutLineKeys.append(c) -
orange/OrangeWidgets/Prototypes/OWDistributionsQt.py
r8358 r8363 14 14 from OWColorPalette import ColorPixmap, ColorPaletteGenerator 15 15 from OWWidget import * 16 from OWGraphQt import *16 from plot.owplot import * 17 17 import OWGUI 18 18 import math 19 19 import statc 20 20 21 from Graph.curve import *22 from Graph.tools import *23 24 class distribErrorBarCurve( Curve):21 from plot.owcurve import * 22 from plot.owtools import * 23 24 class distribErrorBarCurve(OWCurve): 25 25 def __init__(self, text = None): 26 26 self._items = [] 27 Curve.__init__(self,xData=[], yData=[])27 OWCurve.__init__(self,xData=[], yData=[]) 28 28 29 29 def updateProperties(self): 30 if self.style() != Curve.UserCurve:30 if self.style() != OWCurve.UserCurve: 31 31 resize_plot_item_list(self._items, 0, None, self) 32 32 self.items = [] 33 33 self.setDirty() 34 Curve.updateProperties(self)34 OWCurve.updateProperties(self) 35 35 return 36 36 … … 55 55 self._items[i].setPen(self.pen()) 56 56 57 class OWDistributionGraphQt(OW Graph):57 class OWDistributionGraphQt(OWPlot): 58 58 def __init__(self, settingsWidget = None, parent = None, name = None): 59 OW Graph.__init__(self, parent, name, axes = [xBottom, yLeft, yRight])59 OWPlot.__init__(self, parent, name, axes = [xBottom, yLeft, yRight]) 60 60 self.parent = parent 61 61 … … 90 90 curve.setVisible(visible) 91 91 curve.setAxes(xAxis, yAxis) 92 return OW Graph.add_custom_curve(self, curve, enableLegend=0)92 return OWPlot.add_custom_curve(self, curve, enableLegend=0) 93 93 94 94 def sizeHint(self): … … 274 274 else: 275 275 key.setColor(Qt.black) 276 key.setSymbol( Diamond)276 key.setSymbol(OWCurve.Diamond) 277 277 key.setPointSize(7) 278 278 else: … … 365 365 ## (re)set the curves 366 366 if self.variableContinuous: 367 newSymbol = NoSymbol367 newSymbol = OWCurve.NoSymbol 368 368 else: 369 newSymbol = Diamond369 newSymbol = OWCurve.Diamond 370 370 371 371 self.probCurveKey.setData(xs, mps) … … 373 373 374 374 if self.variableContinuous: 375 self.probCurveKey.setStyle( Curve.Lines)375 self.probCurveKey.setStyle(OWCurve.Lines) 376 376 if self.showConfidenceIntervals: 377 377 self.probCurveUpperCIKey.setData(xs, ups) … … 379 379 else: 380 380 if self.showConfidenceIntervals: 381 self.probCurveKey.setStyle( Curve.UserCurve)381 self.probCurveKey.setStyle(OWCurve.UserCurve) 382 382 else: 383 self.probCurveKey.setStyle( Curve.Dots)383 self.probCurveKey.setStyle(OWCurve.Dots) 384 384 else: 385 385 self.enableYRaxis(0) -
orange/OrangeWidgets/Prototypes/OWLinProjGraphQt.py
r8342 r8363 1 from OWGraphQt import *1 from plot.owplot import * 2 2 from copy import copy 3 3 import time … … 7 7 import orngVisFuncts 8 8 import OWColorPalette 9 from Graph.tools import UnconnectedLinesCurve9 from plot.owtools import UnconnectedLinesCurve 10 10 11 11 # indices in curveData … … 24 24 ##### CLASS : OWLINPROJGRAPH 25 25 ########################################################################################### 26 class OWLinProjGraph(OW Graph, orngScaleLinProjData):26 class OWLinProjGraph(OWPlot, orngScaleLinProjData): 27 27 def __init__(self, widget, parent = None, name = "None"): 28 OW Graph.__init__(self, parent, name, axes=[])28 OWPlot.__init__(self, parent, name, axes=[]) 29 29 orngScaleLinProjData.__init__(self) 30 30 … … 69 69 70 70 def setData(self, data, subsetData = None, **args): 71 OW Graph.setData(self, data)71 OWPlot.setData(self, data) 72 72 orngScaleLinProjData.setData(self, data, subsetData, **args) 73 73 #self.anchorData = [] … … 106 106 xdata = self.createXAnchors(100)*(self.hideRadius / 10) 107 107 ydata = self.createYAnchors(100)*(self.hideRadius / 10) 108 self.addCurve("hidecircle", QColor(200,200,200), QColor(200,200,200), 1, style = Qt.SolidLine, symbol = NoSymbol, xData = xdata.tolist() + [xdata[0]], yData = ydata.tolist() + [ydata[0]])108 self.addCurve("hidecircle", QColor(200,200,200), QColor(200,200,200), 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = xdata.tolist() + [xdata[0]], yData = ydata.tolist() + [ydata[0]]) 109 109 110 110 # draw dots at anchors … … 127 127 XAnchors = [a[0] for a in shownAnchorData] 128 128 YAnchors = [a[1] for a in shownAnchorData] 129 self.addCurve("dots", QColor(160,160,160), QColor(160,160,160), 10, style = Qt.NoPen, symbol = Ellipse, xData = XAnchors, yData = YAnchors, showFilledSymbols = 1)129 self.addCurve("dots", QColor(160,160,160), QColor(160,160,160), 10, style = Qt.NoPen, symbol = OWCurve.Ellipse, xData = XAnchors, yData = YAnchors, showFilledSymbols = 1) 130 130 131 131 # draw text at anchors … … 138 138 xdata = self.createXAnchors(100) 139 139 ydata = self.createYAnchors(100) 140 self.addCurve("circle", QColor(Qt.black), QColor(Qt.black), 1, style = Qt.SolidLine, symbol = NoSymbol, xData = xdata.tolist() + [xdata[0]], yData = ydata.tolist() + [ydata[0]])140 self.addCurve("circle", QColor(Qt.black), QColor(Qt.black), 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = xdata.tolist() + [xdata[0]], yData = ydata.tolist() + [ydata[0]]) 141 141 142 142 self.potentialsClassifier = None # remove the classifier so that repaint won't recompute it … … 301 301 if not validData[i]: continue 302 302 newColor = self.contPalette.getRGB(self.noJitteringScaledData[self.dataClassIndex][i]) 303 self.addCurve(str(i), QColor(*newColor+ (self.alphaValue,)), QColor(*newColor+ (self.alphaValue,)), self.pointWidth, symbol = Ellipse, xData = [x_positions[i]], yData = [y_positions[i]])303 self.addCurve(str(i), QColor(*newColor+ (self.alphaValue,)), QColor(*newColor+ (self.alphaValue,)), self.pointWidth, symbol = OWCurve.Ellipse, xData = [x_positions[i]], yData = [y_positions[i]]) 304 304 if self.showValueLines: 305 305 self.addValueLineCurve(x_positions[i], y_positions[i], newColor, i, indices) … … 411 411 self.selectedAnchorIndex = index 412 412 else: 413 OW Graph.mousePressEvent(self, e)413 OWPlot.mousePressEvent(self, e) 414 414 415 415 … … 419 419 self.selectedAnchorIndex = None 420 420 else: 421 OW Graph.mouseReleaseEvent(self, e)421 OWPlot.mouseReleaseEvent(self, e) 422 422 423 423 # ############################################################## … … 439 439 if self._pressed_mouse_button: 440 440 if not self.manualPositioning: 441 OW Graph.mouseMoveEvent(self, e)441 OWPlot.mouseMoveEvent(self, e) 442 442 if redraw: self.replot() 443 443 else: … … 478 478 attrVal = self.scaledData[self.attributeNameIndex[label]][index] 479 479 markerX, markerY = xAnchor*(attrVal+0.03), yAnchor*(attrVal+0.03) 480 curve = self.addCurve("", color, color, 1, style = Qt.SolidLine, symbol = NoSymbol, xData = [0, xAnchor*attrVal], yData = [0, yAnchor*attrVal], lineWidth=3)480 curve = self.addCurve("", color, color, 1, style = Qt.SolidLine, symbol = OWCurve.NoSymbol, xData = [0, xAnchor*attrVal], yData = [0, yAnchor*attrVal], lineWidth=3) 481 481 482 482 marker = None … … 508 508 self.showTip(intX, intY, text) 509 509 510 OW Graph.mouseMoveEvent(self, e)510 OWPlot.mouseMoveEvent(self, e) 511 511 self.replot() 512 512 … … 716 716 painter.drawImage(target, self.potentialsImage, source) 717 717 # painter.drawImage(self.transform(QwtPlot.xBottom, -1), self.transform(QwtPlot.yLeft, 1), self.potentialsImage) 718 OW Graph.drawCanvas(self, painter)718 OWPlot.drawCanvas(self, painter) 719 719 720 720 -
orange/OrangeWidgets/Prototypes/OWScatterPlotGraphQt.py
r8342 r8363 2 2 # OWScatterPlotGraph.py 3 3 # 4 from OWGraphQt import *4 from plot.owplot import * 5 5 import time 6 6 from orngCI import FeatureByCartesianProduct … … 20 20 ##### CLASS : OWSCATTERPLOTGRAPH 21 21 ########################################################################################### 22 class OWScatterPlotGraphQt(OW Graph, orngScaleScatterPlotData):22 class OWScatterPlotGraphQt(OWPlot, orngScaleScatterPlotData): 23 23 def __init__(self, scatterWidget, parent = None, name = "None"): 24 OW Graph.__init__(self, parent, name)24 OWPlot.__init__(self, parent, name) 25 25 orngScaleScatterPlotData.__init__(self) 26 26 … … 49 49 50 50 def setData(self, data, subsetData = None, **args): 51 OW Graph.setData(self, data)51 OWPlot.setData(self, data) 52 52 self.oldLegendKeys = {} 53 53 orngScaleScatterPlotData.setData(self, data, subsetData, **args) … … 323 323 if colorIndex != -1: 324 324 num = len(self.dataDomain[colorIndex].values) 325 val = [[], [], [self.pointWidth]*num, [ Ellipse]*num]325 val = [[], [], [self.pointWidth]*num, [OWCurve.Ellipse]*num] 326 326 varValues = getVariableValuesSorted(self.dataDomain[colorIndex]) 327 327 for ind in range(num): … … 344 344 num = len(self.dataDomain[sizeIndex].values) 345 345 if legendKeys.has_key(sizeIndex): val = legendKeys[sizeIndex] 346 else: val = [[], [Qt.black]*num, [], [ Ellipse]*num]346 else: val = [[], [Qt.black]*num, [], [OWCurve.Ellipse]*num] 347 347 val[2] = []; val[0] = [] 348 348 varValues = getVariableValuesSorted(self.dataDomain[sizeIndex]) … … 406 406 ## color = self.discPalette[classIndices[self.rawData.domain.classVar[classValue[key]].value]] 407 407 ## for (p1, p2) in clusterLines: 408 ## self.addCurve("", color, color, 1, QwtPlotCurve.Lines, NoSymbol, xData = [float(shortData[p1][0]), float(shortData[p2][0])], yData = [float(shortData[p1][1]), float(shortData[p2][1])], lineWidth = width)408 ## self.addCurve("", color, color, 1, QwtPlotCurve.Lines, OWCurve.NoSymbol, xData = [float(shortData[p1][0]), float(shortData[p2][0])], yData = [float(shortData[p1][1]), float(shortData[p2][1])], lineWidth = width) 409 409 ## else: 410 410 ## colorIndex = self.discPalette[classIndices[self.rawData.domain.classVar[classValue].value]] 411 411 ## for (p1, p2) in closure: 412 ## self.addCurve("", color, color, 1, QwtPlotCurve.Lines, NoSymbol, xData = [float(shortData[p1][0]), float(shortData[p2][0])], yData = [float(shortData[p1][1]), float(shortData[p2][1])], lineWidth = width)412 ## self.addCurve("", color, color, 1, QwtPlotCurve.Lines, OWCurve.NoSymbol, xData = [float(shortData[p1][0]), float(shortData[p2][0])], yData = [float(shortData[p1][1]), float(shortData[p2][1])], lineWidth = width) 413 413 414 414 def addTip(self, x, y, attrIndices = None, dataindex = None, text = None): … … 420 420 421 421 422 # override the default buildTooltip function defined in OW Graph422 # override the default buildTooltip function defined in OWPlot 423 423 def buildTooltip(self, exampleIndex): 424 424 if exampleIndex < 0: … … 467 467 468 468 def onMouseReleased(self, e): 469 OW Graph.onMouseReleased(self, e)469 OWPlot.onMouseReleased(self, e) 470 470 self.updateLayout() 471 471 … … 513 513 painter.drawImage(target, self.potentialsImage, source) 514 514 # painter.drawImage(self.transform(xBottom, self.xmin), self.transform(yLeft, self.ymax), self.potentialsImage) 515 OW Graph.drawCanvas(self, painter)515 OWPlot.drawCanvas(self, painter) 516 516 517 517 -
orange/OrangeWidgets/Prototypes/OWScatterPlotQt.py
r8343 r8363 16 16 import OWGUI, OWToolbars, OWColorPalette 17 17 from orngScaleData import * 18 from Graph.curve import Curve18 from plot.owcurve import * 19 19 20 20 ########################################################################################### … … 355 355 def alphaChange(self): 356 356 for curve in self.graph.itemList(): 357 if isinstance(curve, Curve):357 if isinstance(curve, OWCurve): 358 358 color = curve.color() 359 359 color.setAlpha(self.graph.alphaValue) … … 366 366 else: 367 367 for curve in self.graph.itemList(): 368 if isinstance(curve, Curve):368 if isinstance(curve, OWCurve): 369 369 curve.setPointSize(self.graph.pointWidth) 370 370 self.graph.replot()
Note: See TracChangeset
for help on using the changeset viewer.
