Changeset 8972:77fb6a99c10f in orange


Ignore:
Timestamp:
09/15/11 13:12:07 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
4c77b7e0e97ef06432a9247c9ea870e7d1a4f5fe
Message:

More work on plot3d docs

File:
1 edited

Legend:

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

    r8970 r8972  
    218218        .. automethod:: map_to_data 
    219219 
    220     **Colors** 
    221  
    222         Colors are specified with two palettes, one for continuous attributes, and one for 
     220    **Themes** 
     221 
     222        Colors used for data points are specified with two palettes, one for continuous attributes, and one for 
    223223        discrete ones.  Both are created by 
    224224        :obj:`.OWColorPalette.ColorPaletteGenerator` 
    225          
     225 
    226226        .. attribute:: continuous_palette 
    227          
     227 
    228228            The palette used when point color represents a continuous attribute 
    229          
     229 
    230230        .. attribute:: discrete_palette 
    231          
     231 
    232232            The palette used when point color represents a discrete attribute 
    233  
    234233    ''' 
    235234    def __init__(self, parent=None): 
     
    324323 
    325324    def legend(self): 
     325        ''' 
     326            Returns the plot's legend, which is a :obj:`OrangeWidgets.plot.OWLegend` 
     327        ''' 
    326328        return self._legend 
    327329 
     
    708710        specifies a column). Additionally, it accepts a list of colors (when color is a discrete 
    709711        attribute), a value specifying how many different symbols are needed to display the data, 
    710         information whether or not positional data is discrete, and data transformations (scale and 
    711         translation). 
     712        information whether or not positional data is discrete, and transformations (scale and 
     713        translation) that were applied to the data. 
    712714 
    713715        .. note:: This function does not add items to the legend automatically.  
    714716                  You will have to add them yourself with :meth:`.OWLegend.add_item`.  
    715         ''' 
     717 
     718        :param x_index: Index (column) of the x coordinate. 
     719        :type int 
     720 
     721        :param y_index: Index (column) of the y coordinate. 
     722        :type int 
     723 
     724        :param z_index: Index (column) of the z coordinate. 
     725        :type int 
     726 
     727        :param color_index: Index (column) of the color attribute. 
     728        :type int 
     729 
     730        :param symbol_index: Index (column) of the symbol attribute. 
     731        :type int 
     732 
     733        :param size_index: Index (column) of the size attribute. 
     734        :type int 
     735 
     736        :param label_index: Index (column) of the label attribute. 
     737        :type int 
     738 
     739        :param colors: List of colors used for symbols. When color is a discrete attribute, 
     740            this list should be empty. You should make sure the number of colors in this list 
     741            equals the number of unique values in the color attribute. 
     742        :type list of QColor 
     743 
     744        :param num_symbols_used: Specifies the number of unique values in the symbol attribute. 
     745            Must be -1 if all points are to use the same symbol. 
     746        :type int 
     747 
     748        :param x_discrete: Specifies whether or not x coordinate is discrete. 
     749        :type bool 
     750 
     751        :param y_discrete: Specifies whether or not y coordinate is discrete. 
     752        :type bool 
     753 
     754        :param z_discrete: Specifies whether or not z coordinate is discrete. 
     755        :type bool 
     756 
     757        :param data_scale: Specifies the scale that was applied to the data (set with set_plot_data). 
     758            Not required. 
     759        :type numpy.array 
     760 
     761        :param data_translation: Specifies the translation that was applied to the data (set with set_plot_data). 
     762            Not required. 
     763        :type numpy.array 
     764        ''' 
     765        if self.data == None: 
     766            print('set_plot_data has not been called yet!') 
     767            return 
    716768        start = time.time() 
    717769        self.makeCurrent() 
     
    740792            self.generating_program.setUniformValue('y_index', y_index) 
    741793            self.generating_program.setUniformValue('z_index', z_index) 
    742             #self.generating_program.setUniformValue('jitter_size', jitter_size) 
    743             #self.generating_program.setUniformValue('jitter_continuous', jitter_continuous) 
    744794            self.generating_program.setUniformValue('x_discrete', x_discrete) 
    745795            self.generating_program.setUniformValue('y_discrete', y_discrete) 
     
    804854        :param data: Data 
    805855        :type data: numpy array 
    806  
    807856        ''' 
    808857        self.makeCurrent() 
     
    9741023        ''' 
    9751024        self.selection_behavior = behavior 
     1025 
     1026    def send_selection(self): 
     1027        if self.auto_send_selection_callback: 
     1028            self.auto_send_selection_callback() 
    9761029 
    9771030    def mousePressEvent(self, event): 
     
    10941147                self.set_new_zoom(*min_max, plot_coordinates=True) 
    10951148            else: 
    1096                 area = self._selection 
    1097                 self.select_points(area, self.selection_behavior) 
     1149                self.select_points(self._selection, self.selection_behavior) 
    10981150 
    10991151                if self.auto_send_selection_callback: 
     
    11321184 
    11331185    def set_palette(self, p): 
     1186        ''' 
     1187            Sets the plot palette to ``p``.  
     1188             
     1189            :param p: The new color palette 
     1190            :type p: :obj:`.QPalette` 
     1191        ''' 
    11341192        self.setPalette(p) 
    11351193        self.update() 
     
    11401198 
    11411199    def clear(self): 
     1200        ''' 
     1201        Clears the plot (data, legend) but remembers plot transformations (zoom, scale, translation). 
     1202        ''' 
    11421203        self._legend.clear() 
    11431204        self.data_scale = array([1., 1., 1.]) 
     
    11471208 
    11481209    def clear_plot_transformations(self): 
     1210        ''' 
     1211        Forgets plot transformations (zoom, scale, translation). 
     1212        ''' 
    11491213        self._zoom_stack = [] 
    11501214        self._zoomed_size = [1., 1., 1.] 
Note: See TracChangeset for help on using the changeset viewer.