Changeset 8363:e185adc25e0e in orange


Ignore:
Timestamp:
07/06/11 10:38:43 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
98dad152de2d46965059dd63c5627272d6c6246c
Message:

Rename the python classes to a consistent naming scheme

Location:
orange/OrangeWidgets
Files:
10 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWkNNOptimization.py

    r8342 r8363  
    11from OWWidget import * 
    22import OWGUI, OWDlgs, numpy, user, sys 
    3 from Graph.tools import * 
    4 from OWGraphQt import * 
     3from plot.owtools import * 
     4from plot.owplot import * 
    55from orngVizRank import * 
    66from orngScaleData import getVariableValuesSorted 
     
    634634    def attributeAnalysis(self): 
    635635        if not self.attributeHistogramDlg: 
    636             self.attributeHistogramDlg = OWGraphAttributeHistogram(self, VIZRANK_POINT, signalManager = self.signalManager) 
     636            self.attributeHistogramDlg = OWPlotAttributeHistogram(self, VIZRANK_POINT, signalManager = self.signalManager) 
    637637        self.attributeHistogramDlg.show() 
    638638        self.attributeHistogramDlg.setResults(self.graph.rawData, self.shownResults) 
    639639 
    640640    def graphProjectionQuality(self): 
    641         dialog = OWGraphProjectionQuality(self, VIZRANK_POINT, signalManager = self.signalManager) 
     641        dialog = OWPlotProjectionQuality(self, VIZRANK_POINT, signalManager = self.signalManager) 
    642642        dialog.show() 
    643643        dialog.setResults(self.results) 
     
    645645    def identifyOutliers(self): 
    646646        if not self.identifyOutliersDlg: 
    647             self.identifyOutliersDlg = OWGraphIdentifyOutliers(self, VIZRANK_POINT, signalManager = self.signalManager, widget = self.parentWidget) 
     647            self.identifyOutliersDlg = OWPlotIdentifyOutliers(self, VIZRANK_POINT, signalManager = self.signalManager, widget = self.parentWidget) 
    648648        self.identifyOutliersDlg.show() 
    649649        self.identifyOutliersDlg.setResults(self.graph.rawData, self.shownResults) 
     
    842842        self.useGeneSets = 0 
    843843 
    844         self.graph = OWGraph(self.mainArea) 
     844        self.graph = OWPlot(self.mainArea) 
    845845        self.mainArea.layout().addWidget(self.graph) 
    846846 
     
    10881088         
    10891089        """  
    1090             Commented out to be compatible with Qt-only OWGraph 
    1091         self.graph.setAxisScaleDraw(QwtPlot.xBottom, OWGraphTools.DiscreteAxisScaleDraw(attributes)) 
     1090            Commented out to be compatible with Qt-only OWPlot 
     1091        self.graph.setAxisScaleDraw(QwtPlot.xBottom, OWPlotTools.DiscreteAxisScaleDraw(attributes)) 
    10921092        self.graph.axisScaleDraw(QwtPlot.xBottom).enableComponent(QwtScaleDraw.Ticks, 0) 
    10931093        self.graph.axisScaleDraw(QwtPlot.xBottom).enableComponent(QwtScaleDraw.Backbone, 0) 
     
    10991099            self.graph.axisScaleDraw(QwtPlot.xBottom).setLabelAlignment(Qt.AlignLeft) 
    11001100 
    1101         self.graph.setAxisScaleDraw(QwtPlot.yLeft, OWGraphTools.DiscreteAxisScaleDraw([""] + attributes[::-1])) 
     1101        self.graph.setAxisScaleDraw(QwtPlot.yLeft, OWPlotTools.DiscreteAxisScaleDraw([""] + attributes[::-1])) 
    11021102        self.graph.axisScaleDraw(QwtPlot.yLeft).enableComponent(QwtScaleDraw.Ticks, 0) 
    11031103        self.graph.axisScaleDraw(QwtPlot.yLeft).enableComponent(QwtScaleDraw.Backbone, 0) 
     
    11181118 
    11191119 
    1120 class OWGraphAttributeHistogram(OWWidget): 
     1120class OWPlotAttributeHistogram(OWWidget): 
    11211121    settingsList = ["attributeCount", "projectionCount", "rotateXAttributes", "colorAttributes", "progressLines", "useGeneSets", "recentGeneSets"] 
    11221122    def __init__(self, parent=None, dialogType=VIZRANK_POINT, signalManager = None): 
     
    11311131        self.evaluatedAttributesByClass = None 
    11321132 
    1133         self.graph = OWGraph(self.mainArea) 
     1133        self.graph = OWPlot(self.mainArea) 
    11341134        self.mainArea.layout().addWidget(self.graph) 
    11351135 
     
    13191319# ############################################################################# 
    13201320# 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 OWGraphProjectionQuality(OWWidget): 
     1321class OWPlotProjectionQuality(OWWidget): 
    13221322    def __init__(self,parent=None, dialogType = VIZRANK_POINT, signalManager = None): 
    13231323        OWWidget.__init__(self, parent, signalManager, "Projection Quality", wantGraph = 1) 
     
    13391339        self.controlArea.layout().addStretch(100) 
    13401340 
    1341         self.graph = OWGraph(self.mainArea) 
     1341        self.graph = OWPlot(self.mainArea) 
    13421342        self.mainArea.layout().addWidget(self.graph) 
    13431343        self.graph.showXaxisTitle = 1 
     
    14211421# ############################################################################# 
    14221422# 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 OWGraphIdentifyOutliers(VizRankOutliers, OWWidget): 
     1423class OWPlotIdentifyOutliers(VizRankOutliers, OWWidget): 
    14241424    settingsList = ["projectionCountList", "showLegend", "showAllClasses", "sortProjections", "showClickedProjection"] 
    14251425    def __init__(self, vizrank, dialogType, signalManager = None, widget = None): 
     
    14601460        self.exampleList.setToolTip("Average probabilities of correct classification and indices of corresponding examples") 
    14611461 
    1462         self.graph = OWGraph(self.mainArea) 
     1462        self.graph = OWPlot(self.mainArea) 
    14631463        self.mainArea.layout().addWidget(self.graph) 
    14641464        self.graph.showXaxisTitle = 1 
     
    17201720    ow=OWVizRank() 
    17211721##    ow = OWInteractionAnalysis() 
    1722 ##    ow = OWGraphAttributeHistogram() 
     1722##    ow = OWPlotAttributeHistogram() 
    17231723    ow.show() 
    17241724    a.exec_() 
  • orange/OrangeWidgets/Prototypes/OWDiscretizeQt.py

    r8342 r8363  
    88import orange 
    99from OWWidget import * 
    10 from OWGraphQt import * 
     10from plot.owplot import * 
     11from plot.owcurve import * 
    1112import OWGUI 
    12 from Graph.curve import * 
    1313import math 
    1414 
     
    1717    return [low+i*inc for i in range(steps)] 
    1818 
    19 class DiscGraph(OWGraph): 
     19class DiscGraph(OWPlot): 
    2020    def __init__(self, master, *args): 
    21         OWGraph.__init__(self, *args) 
     21        OWPlot.__init__(self, *args) 
    2222        self.master=master 
    2323 
     
    158158             
    159159            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) 
    161161                c.setYAxis(yRight) 
    162162                self.rugKeys.append(c) 
    163163 
    164164            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) 
    166166                c.setYAxis(yRight) 
    167167                self.rugKeys.append(c) 
     
    182182                self.baseCurveX, self.baseCurveY = self.computeAddedScore(list(self.curCutPoints)) 
    183183             
    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) 
    185185            self.baseCurveKey.setYAxis(yLeft) 
    186186 
     
    195195 
    196196        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) 
    198198            self.lookaheadCurveKey.setYAxis(yLeft) 
    199199            #self.lookaheadCurveKey.setVisible(1) 
     
    210210        if self.contingency and self.condProb and self.master.showTargetClassProb: 
    211211            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) 
    213213            self.probCurveKey.setYAxis(yRight) 
    214214 
     
    226226 
    227227        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) 
    229229            c.setYAxis(yRight) 
    230230            self.cutLineKeys.append(c) 
     
    256256    def addCutPoint(self, cut): 
    257257        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) 
    259259        c.setYAxis(yRight) 
    260260        self.cutLineKeys.append(c) 
  • orange/OrangeWidgets/Prototypes/OWDistributionsQt.py

    r8358 r8363  
    1414from OWColorPalette import ColorPixmap, ColorPaletteGenerator 
    1515from OWWidget import * 
    16 from OWGraphQt import * 
     16from plot.owplot import * 
    1717import OWGUI 
    1818import math 
    1919import statc 
    2020 
    21 from Graph.curve import * 
    22 from Graph.tools import * 
    23  
    24 class distribErrorBarCurve(Curve): 
     21from plot.owcurve import * 
     22from plot.owtools import * 
     23 
     24class distribErrorBarCurve(OWCurve): 
    2525    def __init__(self, text = None): 
    2626        self._items = [] 
    27         Curve.__init__(self,xData=[], yData=[]) 
     27        OWCurve.__init__(self,xData=[], yData=[]) 
    2828         
    2929    def updateProperties(self): 
    30         if self.style() != Curve.UserCurve: 
     30        if self.style() != OWCurve.UserCurve: 
    3131            resize_plot_item_list(self._items, 0, None, self) 
    3232            self.items = [] 
    3333            self.setDirty() 
    34             Curve.updateProperties(self) 
     34            OWCurve.updateProperties(self) 
    3535            return 
    3636             
     
    5555            self._items[i].setPen(self.pen()) 
    5656 
    57 class OWDistributionGraphQt(OWGraph): 
     57class OWDistributionGraphQt(OWPlot): 
    5858    def __init__(self, settingsWidget = None, parent = None, name = None): 
    59         OWGraph.__init__(self, parent, name, axes = [xBottom, yLeft, yRight]) 
     59        OWPlot.__init__(self, parent, name, axes = [xBottom, yLeft, yRight]) 
    6060        self.parent = parent 
    6161 
     
    9090        curve.setVisible(visible) 
    9191        curve.setAxes(xAxis, yAxis) 
    92         return OWGraph.add_custom_curve(self, curve, enableLegend=0) 
     92        return OWPlot.add_custom_curve(self, curve, enableLegend=0) 
    9393 
    9494    def sizeHint(self): 
     
    274274            else: 
    275275                key.setColor(Qt.black) 
    276                 key.setSymbol(Diamond) 
     276                key.setSymbol(OWCurve.Diamond) 
    277277                key.setPointSize(7) 
    278278        else: 
     
    365365            ## (re)set the curves 
    366366            if self.variableContinuous: 
    367                 newSymbol = NoSymbol 
     367                newSymbol = OWCurve.NoSymbol 
    368368            else: 
    369                 newSymbol = Diamond 
     369                newSymbol = OWCurve.Diamond 
    370370                 
    371371            self.probCurveKey.setData(xs, mps) 
     
    373373 
    374374            if self.variableContinuous: 
    375                 self.probCurveKey.setStyle(Curve.Lines) 
     375                self.probCurveKey.setStyle(OWCurve.Lines) 
    376376                if self.showConfidenceIntervals: 
    377377                    self.probCurveUpperCIKey.setData(xs, ups) 
     
    379379            else: 
    380380                if self.showConfidenceIntervals: 
    381                     self.probCurveKey.setStyle(Curve.UserCurve) 
     381                    self.probCurveKey.setStyle(OWCurve.UserCurve) 
    382382                else: 
    383                     self.probCurveKey.setStyle(Curve.Dots) 
     383                    self.probCurveKey.setStyle(OWCurve.Dots) 
    384384        else: 
    385385            self.enableYRaxis(0) 
  • orange/OrangeWidgets/Prototypes/OWLinProjGraphQt.py

    r8342 r8363  
    1 from OWGraphQt import * 
     1from plot.owplot import * 
    22from copy import copy 
    33import time 
     
    77import orngVisFuncts 
    88import OWColorPalette 
    9 from Graph.tools import UnconnectedLinesCurve 
     9from plot.owtools import UnconnectedLinesCurve 
    1010 
    1111# indices in curveData 
     
    2424##### CLASS : OWLINPROJGRAPH 
    2525########################################################################################### 
    26 class OWLinProjGraph(OWGraph, orngScaleLinProjData): 
     26class OWLinProjGraph(OWPlot, orngScaleLinProjData): 
    2727    def __init__(self, widget, parent = None, name = "None"): 
    28         OWGraph.__init__(self, parent, name, axes=[]) 
     28        OWPlot.__init__(self, parent, name, axes=[]) 
    2929        orngScaleLinProjData.__init__(self) 
    3030 
     
    6969 
    7070    def setData(self, data, subsetData = None, **args): 
    71         OWGraph.setData(self, data) 
     71        OWPlot.setData(self, data) 
    7272        orngScaleLinProjData.setData(self, data, subsetData, **args) 
    7373        #self.anchorData = [] 
     
    106106                xdata = self.createXAnchors(100)*(self.hideRadius / 10) 
    107107                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]]) 
    109109 
    110110            # draw dots at anchors 
     
    127127                XAnchors = [a[0] for a in shownAnchorData] 
    128128                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) 
    130130 
    131131                # draw text at anchors 
     
    138138            xdata = self.createXAnchors(100) 
    139139            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]]) 
    141141 
    142142        self.potentialsClassifier = None # remove the classifier so that repaint won't recompute it 
     
    301301                if not validData[i]: continue 
    302302                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]]) 
    304304                if self.showValueLines: 
    305305                    self.addValueLineCurve(x_positions[i], y_positions[i], newColor, i, indices) 
     
    411411                    self.selectedAnchorIndex = index 
    412412        else: 
    413             OWGraph.mousePressEvent(self, e) 
     413            OWPlot.mousePressEvent(self, e) 
    414414 
    415415 
     
    419419            self.selectedAnchorIndex = None 
    420420        else: 
    421             OWGraph.mouseReleaseEvent(self, e) 
     421            OWPlot.mouseReleaseEvent(self, e) 
    422422 
    423423    # ############################################################## 
     
    439439        if self._pressed_mouse_button: 
    440440            if not self.manualPositioning: 
    441                 OWGraph.mouseMoveEvent(self, e) 
     441                OWPlot.mouseMoveEvent(self, e) 
    442442                if redraw: self.replot() 
    443443            else: 
     
    478478                        attrVal = self.scaledData[self.attributeNameIndex[label]][index] 
    479479                        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) 
    481481 
    482482                        marker = None 
     
    508508                self.showTip(intX, intY, text) 
    509509 
    510         OWGraph.mouseMoveEvent(self, e) 
     510        OWPlot.mouseMoveEvent(self, e) 
    511511        self.replot() 
    512512 
     
    716716            painter.drawImage(target, self.potentialsImage, source) 
    717717#            painter.drawImage(self.transform(QwtPlot.xBottom, -1), self.transform(QwtPlot.yLeft, 1), self.potentialsImage) 
    718         OWGraph.drawCanvas(self, painter) 
     718        OWPlot.drawCanvas(self, painter) 
    719719 
    720720 
  • orange/OrangeWidgets/Prototypes/OWScatterPlotGraphQt.py

    r8342 r8363  
    22# OWScatterPlotGraph.py 
    33# 
    4 from OWGraphQt import * 
     4from plot.owplot import * 
    55import time 
    66from orngCI import FeatureByCartesianProduct 
     
    2020##### CLASS : OWSCATTERPLOTGRAPH 
    2121########################################################################################### 
    22 class OWScatterPlotGraphQt(OWGraph, orngScaleScatterPlotData): 
     22class OWScatterPlotGraphQt(OWPlot, orngScaleScatterPlotData): 
    2323    def __init__(self, scatterWidget, parent = None, name = "None"): 
    24         OWGraph.__init__(self, parent, name) 
     24        OWPlot.__init__(self, parent, name) 
    2525        orngScaleScatterPlotData.__init__(self) 
    2626 
     
    4949 
    5050    def setData(self, data, subsetData = None, **args): 
    51         OWGraph.setData(self, data) 
     51        OWPlot.setData(self, data) 
    5252        self.oldLegendKeys = {} 
    5353        orngScaleScatterPlotData.setData(self, data, subsetData, **args) 
     
    323323            if colorIndex != -1: 
    324324                num = len(self.dataDomain[colorIndex].values) 
    325                 val = [[], [], [self.pointWidth]*num, [Ellipse]*num] 
     325                val = [[], [], [self.pointWidth]*num, [OWCurve.Ellipse]*num] 
    326326                varValues = getVariableValuesSorted(self.dataDomain[colorIndex]) 
    327327                for ind in range(num): 
     
    344344                num = len(self.dataDomain[sizeIndex].values) 
    345345                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] 
    347347                val[2] = []; val[0] = [] 
    348348                varValues = getVariableValuesSorted(self.dataDomain[sizeIndex]) 
     
    406406##                color = self.discPalette[classIndices[self.rawData.domain.classVar[classValue[key]].value]] 
    407407##                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) 
    409409##        else: 
    410410##            colorIndex = self.discPalette[classIndices[self.rawData.domain.classVar[classValue].value]] 
    411411##            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) 
    413413 
    414414    def addTip(self, x, y, attrIndices = None, dataindex = None, text = None): 
     
    420420 
    421421 
    422     # override the default buildTooltip function defined in OWGraph 
     422    # override the default buildTooltip function defined in OWPlot 
    423423    def buildTooltip(self, exampleIndex): 
    424424        if exampleIndex < 0: 
     
    467467 
    468468    def onMouseReleased(self, e): 
    469         OWGraph.onMouseReleased(self, e) 
     469        OWPlot.onMouseReleased(self, e) 
    470470        self.updateLayout() 
    471471 
     
    513513            painter.drawImage(target, self.potentialsImage, source) 
    514514#            painter.drawImage(self.transform(xBottom, self.xmin), self.transform(yLeft, self.ymax), self.potentialsImage) 
    515         OWGraph.drawCanvas(self, painter) 
     515        OWPlot.drawCanvas(self, painter) 
    516516 
    517517 
  • orange/OrangeWidgets/Prototypes/OWScatterPlotQt.py

    r8343 r8363  
    1616import OWGUI, OWToolbars, OWColorPalette 
    1717from orngScaleData import * 
    18 from Graph.curve import Curve 
     18from plot.owcurve import * 
    1919 
    2020########################################################################################### 
     
    355355    def alphaChange(self): 
    356356        for curve in self.graph.itemList(): 
    357             if isinstance(curve, Curve): 
     357            if isinstance(curve, OWCurve): 
    358358                color = curve.color() 
    359359                color.setAlpha(self.graph.alphaValue) 
     
    366366        else: 
    367367            for curve in self.graph.itemList(): 
    368                 if isinstance(curve, Curve): 
     368                if isinstance(curve, OWCurve): 
    369369                    curve.setPointSize(self.graph.pointWidth) 
    370370            self.graph.replot() 
Note: See TracChangeset for help on using the changeset viewer.