class_docstr: ScatterVisualizer is a bivariate feature data visualization algorithm that
  plots using the Cartesian coordinates of each point.
  
      Parameters
      ----------
  
      ax : a matplotlib plot, default: None
          The axis to plot the figure on.
  
      x : string, default: None
          The feature name that corresponds to a column name or index postion
          in the matrix that will be plotted against the x-axis
  
      y : string, default: None
          The feature name that corresponds to a column name or index postion
          in the matrix that will be plotted against the y-axis
  
      features : a list of two feature names to use, default: None
          List of two features that correspond to the columns in the array.
          The order of the two features correspond to X and Y axes on the
          graph. More than two feature names or columns will raise an error.
          If a DataFrame is passed to fit and features is None, feature names
          are selected that are the columns of the DataFrame.
  
      classes : a list of class names for the legend, default: None
          If classes is None and a y value is passed to fit then the classes
          are selected from the target vector.
  
      color : optional list or tuple of colors to colorize points, default: None
          Use either color to colorize the points on a per class basis or
          colormap to color them on a continuous scale.
  
      colormap : optional string or matplotlib cmap to colorize points, default: None
          Use either color to colorize the points on a per class basis or
          colormap to color them on a continuous scale.
  
      markers : iterable of strings, default: ,+o*vhd
          Matplotlib style markers for points on the scatter plot points
  
      alpha : float, default: 1.0
          Specify a transparency where 1 is completely opaque and 0 is completely
          transparent. This property makes densely clustered points more visible.
  
      kwargs : keyword arguments passed to the super class.
  
      These parameters can be influenced later on in the visualization
      process, but can and should be set as early as possible.
class_docstr_tok: ["ScatterVisualizer","is","a","bivariate","feature","data","visualization","algorithm","that","plots","using","the","Cartesian","coordinates","of","each","point",".","Parameters","--","--","--","--","--","ax",":","a","matplotlib","plot",",","default",":","None","The","axis","to","plot","the","figure","on",".","x",":","string",",","default",":","None","The","feature","name","that","corresponds","to","a","column","name","or","index","postion","in","the","matrix","that","will","be","plotted","against","the","x-axis","y",":","string",",","default",":","None","The","feature","name","that","corresponds","to","a","column","name","or","index","postion","in","the","matrix","that","will","be","plotted","against","the","y-axis","features",":","a","list","of","two","feature","names","to","use",",","default",":","None","List","of","two","features","that","correspond","to","the","columns","in","the","array",".","The","order","of","the","two","features","correspond","to","X","and","Y","axes","on","the","graph",".","More","than","two","feature","names","or","columns","will","raise","an","error",".","If","a","DataFrame","is","passed","to","fit","and","features","is","None",",","feature","names","are","selected","that","are","the","columns","of","the","DataFrame",".","classes",":","a","list","of","class","names","for","the","legend",",","default",":","None","If","classes","is","None","and","a","y","value","is","passed","to","fit","then","the","classes","are","selected","from","the","target","vector",".","color",":","optional","list","or","tuple","of","colors","to","colorize","points",",","default",":","None","Use","either","color","to","colorize","the","points","on","a","per","class","basis","or","colormap","to","color","them","on","a","continuous","scale",".","colormap",":","optional","string","or","matplotlib","cmap","to","colorize","points",",","default",":","None","Use","either","color","to","colorize","the","points","on","a","per","class","basis","or","colormap","to","color","them","on","a","continuous","scale",".","markers",":","iterable","of","strings",",","default",":",",","+o","*","vhd","Matplotlib","style","markers","for","points","on","the","scatter","plot","points","alpha",":","float",",","default",":","1.0","Specify","a","transparency","where","1","is","completely","opaque","and","0","is","completely","transparent",".","This","property","makes","densely","clustered","points","more","visible",".","kwargs",":","keyword","arguments","passed","to","the","super","class",".","These","parameters","can","be","influenced","later","on","in","the","visualization","process",",","but","can","and","should","be","set","as","early","as","possible","."]
docstr: The fit method is the primary drawing input for the parallel coords
  visualization since it has both the X and y data required for the
  viz and the transform method does not.
  
  Parameters
  ----------
  X : ndarray or DataFrame of shape n x m
      A matrix of n instances with 2 features
  
  y : ndarray or Series of length n
      An array or series of target or class values
  
  kwargs : dict
      Pass generic arguments to the drawing method
  
  Returns
  -------
  self : instance
      Returns the instance of the transformer/visualizer
docstr_tok: ["The","fit","method","is","the","primary","drawing","input","for","the","parallel","coords","visualization","since","it","has","both","the","X","and","y","data","required","for","the","viz","and","the","transform","method","does","not",".","Parameters","--","--","--","--","--","X",":","ndarray","or","DataFrame","of","shape","n","x","m","A","matrix","of","n","instances","with","2","features","y",":","ndarray","or","Series","of","length","n","An","array","or","series","of","target","or","class","values","kwargs",":","dict","Pass","generic","arguments","to","the","drawing","method","Returns","--","--","--","-","self",":","instance","Returns","the","instance","of","the","transformer\/visualizer"]
code: def fit(self, X, y=None, **kwargs):
      """
      The fit method is the primary drawing input for the parallel coords
      visualization since it has both the X and y data required for the
      viz and the transform method does not.
  
      Parameters
      ----------
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with 2 features
  
      y : ndarray or Series of length n
          An array or series of target or class values
  
      kwargs : dict
          Pass generic arguments to the drawing method
  
      Returns
      -------
      self : instance
          Returns the instance of the transformer/visualizer
      """
      _, ncols = X.shape
  
      # NOTE: Do not call super for this class, it conflicts with the fit.
      # Setting these variables is similar to the old behavior of DataVisualizer.
      # TODO: refactor to make use of the new DataVisualizer functionality
      self.features_ = self.features
      self.classes_ = self.classes
  
      if ncols == 2:
          X_two_cols = X
          if self.features_ is None:
              self.features_ = ["Feature One", "Feature Two"]
  
      # Handle the feature names if they're None.
      elif self.features_ is not None and is_dataframe(X):
          X_two_cols = X[self.features_].values
  
      # handle numpy named/ structured array
      elif self.features_ is not None and is_structured_array(X):
          X_selected = X[self.features_]
          X_two_cols = X_selected.copy().view(
              (np.float64, len(X_selected.dtype.names))
          )
  
      # handle features that are numeric columns in ndarray matrix
      elif self.features_ is not None and has_ndarray_int_columns(
          self.features_, X
      ):
          f_one, f_two = self.features_
          X_two_cols = X[:, [int(f_one), int(f_two)]]
  
      else:
          raise YellowbrickValueError(
              """
                  ScatterVisualizer only accepts two features, please
                  explicitly set these two features in the init kwargs or
                  pass a matrix/ dataframe in with only two columns."""
          )
  
      # Store the classes for the legend if they're None.
      if self.classes_ is None:
          # TODO: Is this the most efficient method?
          self.classes_ = [str(label) for label in np.unique(y)]
  
      # Draw the instances
      self.draw(X_two_cols, y, **kwargs)
  
      # Fit always returns self.
      return self
  
file_path: yellowbrick/yellowbrick/contrib/scatter.py
imports: import itertools
  import numpy
  from yellowbrick.features.base import DataVisualizer
  from yellowbrick.utils import is_dataframe, is_structured_array
  from yellowbrick.utils import has_ndarray_int_columns
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.style.colors import resolve_colors
label_desc: Use image node_id 2 for calling the ScatterVisualizer obj's underlying member method code with example usage: obj.fit(X, y) and returns: self