(self, data)
Discretize continuous attributes, and put all attributes and discrete
        metas into self.attrs.

        Select the first two attributes unless context overrides this.
        Method `resolve_shown_attributes` is called to use the attributes from
        the input, if it exists and matches the attributes in the data.

        Remove selection; again let the context override this.
        Initialize the vizrank dialog, but don't show it.

        Args:
            data (Table): input data
Discretize continuous attributes, and put all attributes and discrete
        metas into self.attrs.
Discretize continuous attributes and put all attributes and discrete metas into self . attrs .
def set_data(self, data):
        """
        Discretize continuous attributes, and put all attributes and discrete
        metas into self.attrs.

        Select the first two attributes unless context overrides this.
        Method `resolve_shown_attributes` is called to use the attributes from
        the input, if it exists and matches the attributes in the data.

        Remove selection; again let the context override this.
        Initialize the vizrank dialog, but don't show it.

        Args:
            data (Table): input data
        """
        if isinstance(data, SqlTable) and data.approx_len() > LARGE_TABLE:
            data = data.sample_time(DEFAULT_SAMPLE_TIME)

        self.closeContext()
        self.data = data
        self.areas = []
        self.selection = set()
        if self.data is None:
            self.attrs[:] = []
            self.domain_model.set_domain(None)
            self.discrete_data = None
        else:
            self.domain_model.set_domain(data.domain)
        self.attrs = [x for x in self.domain_model if isinstance(x, Variable)]
        if self.attrs:
            self.attr_x = self.attrs[0]
            self.attr_y = self.attrs[len(self.attrs) > 1]
        else:
            self.attr_x = self.attr_y = None
            self.areas = []
            self.selection = set()
        self.openContext(self.data)
        if self.data:
            self.discrete_data = self.sparse_to_dense(data, True)
        self.resolve_shown_attributes()
        self.update_graph()
        self.update_selection()

        self.vizrank.initialize()
        self.vizrank_button.setEnabled(
            self.data is not None and len(self.data) > 1 and
            len(self.data.domain.attributes) > 1 and not self.data.is_sparse())
def set_data ( self , data ) : if isinstance ( data , SqlTable ) and data . approx_len ( ) > LARGE_TABLE : data = data . sample_time ( DEFAULT_SAMPLE_TIME ) self . closeContext ( ) self . data = data self . areas = [ ] self . selection = set ( ) if self . data is None : self . attrs [ : ] = [ ] self . domain_model . set_domain ( None ) self . discrete_data = None else : self . domain_model . set_domain ( data . domain ) self . attrs = [ x for x in self . domain_model if isinstance ( x , Variable ) ] if self . attrs : self . attr_x = self . attrs [ 0 ] self . attr_y = self . attrs [ len ( self . attrs ) > 1 ] else : self . attr_x = self . attr_y = None self . areas = [ ] self . selection = set ( ) self . openContext ( self . data ) if self . data : self . discrete_data = self . sparse_to_dense ( data , True ) self . resolve_shown_attributes ( ) self . update_graph ( ) self . update_selection ( ) self . vizrank . initialize ( ) self . vizrank_button . setEnabled ( self . data is not None and len ( self . data ) > 1 and len ( self . data . domain . attributes ) > 1 and not self . data . is_sparse ( ) )