Changeset 8535:bff9b284c912 in orange


Ignore:
Timestamp:
07/29/11 21:37:56 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
a890bc1df250973fe326d469b004bea7ae57c4b7
Message:

Expand on the OWPlot documentation

Location:
orange/OrangeWidgets
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/__init__.py

    r8526 r8535  
    55************************* 
    66 
    7 The main class of this module is :obj:`OrangeWidgets.plot.OWPlot`, from which all plots  
     7The main class of this module is :obj:`OWPlot`, from which all plots  
    88in visualization widgets should inherit.  
    99 
    10 This module also contains plot elements, which are normally use by the :obj:`OrangeWidgets.plot.OWPlot`, but can  
    11 be either subclassed or used directly from outside. These elements are: 
    12 * :obj: `OrangeWidgets.plot.OWCurve` 
    13 * :obj: `OrangeWidgets.plot.OWPoint` 
    14 * :obj: `OrangeWidgets.plot.OWAxis` 
    15 * :obj: `OrangeWidgets.plot.OWLegend` 
     10This module also contains plot elements, which are normally used by the :obj:`OrangeWidgets.plot.owplot.OWPlot`,  
     11but can also be used directly or subclassed 
     12 
    1613""" 
    1714 
  • orange/OrangeWidgets/plot/owcurve.py

    r8444 r8535  
     1''' 
     2############################## 
     3Curve (``owcurve``) 
     4############################## 
     5 
     6.. autoclass:: OWCurve 
     7    :members: 
     8    :show-inheritance: 
     9''' 
    110 
    211from OWBaseWidget import * 
     
    514from Orange.misc import deprecated_members 
    615 
    7 """ 
    8     This class represents a curve on a graph. 
    9      
    10     .. attribute:: pen_color 
    11      
    12     .. attribute:: brush_color 
    13          
    14     .. attribute:: data 
    15         A list of pairs (x,y) 
    16          
    17     .. attribute:: point_size 
    18          
    19     .. attribute:: continuous 
    20         If true, the curve is drawn as a continuous line. Otherwise, it's drawn as a series of points 
    21          
    22     .. method:: symbol(x,y,s=None,parent=None) 
    23         Returns a QGraphicsItem with this curve's symbol at position ``x'',``y'' with size ``s'' and parent ``parent'' 
    24          
    25 """ 
    2616@deprecated_members({ 
    2717    "setYAxis" : "set_y_axis", 
     
    2919}) 
    3020class OWCurve(orangeplot.Curve): 
     21    """ 
     22        This class represents a curve on a plot.       
     23    """ 
    3124    def __init__(self, xData=[], yData=[], x_axis_key=xBottom, y_axis_key=yLeft, tooltip=None, parent=None, scene=None): 
    3225        orangeplot.Curve.__init__(self, xData, yData, parent, scene) 
  • orange/OrangeWidgets/plot/owplot.py

    r8526 r8535  
    44############################## 
    55 
    6 .. autoclass:: OWPlot 
     6.. autoclass:: OrangeWidgets.plot.OWPlot 
    77    :members: 
    88    :show-inheritance: 
     
    354354        ''' 
    355355            Sets the labels of axis ``axis_id`` to ``labels``. This changes the axis scale and removes any previous scale 
    356             set with :meth: `set_axis_scale`.  
     356            set with :meth:`set_axis_scale`.  
    357357        ''' 
    358358        if axis_id in self._bounds_cache: 
     
    364364        ''' 
    365365            Sets the labels of axis ``axis_id`` to ``labels``. This changes the axis scale and removes any previous labels 
    366             set with :meth: `set_axis_labels`.  
     366            set with :meth:`set_axis_labels`.  
    367367        ''' 
    368368        qDebug('Setting axis scale for ' + str(axis_id) + ' with axes ' + ' '.join(str(i) for i in self.axes)) 
  • orange/OrangeWidgets/plot/owtools.py

    r8467 r8535  
     1''' 
     2############################## 
     3Plot tools (``owtools``) 
     4############################## 
     5 
     6.. autoclass:: TooltipManager 
     7    :members: 
     8     
     9.. autoclass:: PolygonCurve 
     10    :members: 
     11    :show-inheritance: 
     12     
     13.. autoclass:: RectangleCurve 
     14    :members: 
     15    :show-inheritance: 
     16     
     17.. autoclass:: CircleCurve 
     18    :members: 
     19    :show-inheritance: 
     20     
     21.. autoclass:: UnconnectedLinesCurve 
     22    :members: 
     23    :show-inheritance: 
     24     
     25.. autoclass:: Marker 
     26    :members: 
     27    :show-inheritance: 
     28 
     29''' 
     30 
    131from PyQt4.QtGui import QGraphicsItem, QGraphicsRectItem, QPolygonF, QGraphicsPolygonItem, QPen, QBrush 
    232from PyQt4.QtCore import Qt, QRectF, QPointF, qDebug, QPropertyAnimation 
     
    434from owcurve import * 
    535 
    6 """ 
    7     Efficiently resizes a list of QGraphicsItems (PlotItems, Curves, etc.) 
    8     If the list is to be reduced, i.e. if len(lst) > size, then the extra items are first removed from the scene 
    9 """ 
    10  
    1136def resize_plot_item_list(lst, size, item_type, parent): 
     37    """ 
     38        Efficiently resizes a list of QGraphicsItems (PlotItems, Curves, etc.).  
     39        If the list is to be reduced, i.e. if len(lst) > size, then the extra items are first removed from the scene. 
     40        If items have to be added to the scene, new items will be of type ``item_type`` and will have ``parent`` 
     41        as their parent item.  
     42    """ 
    1243    n = len(lst) 
    1344    if n > size: 
Note: See TracChangeset for help on using the changeset viewer.