class_docstr: The ProjectionVisualizer provides functionality for projecting a multi-dimensional
  dataset into either 2 or 3 components so they can be plotted as a scatter plot on
  2d or 3d axes. The visualizer acts as a transformer, and draws the transformed data
  on behalf of the user. Because it is a DataVisualizer, the ProjectionVisualizer
  can plot continuous scatter plots with a colormap or discrete scatter plots with
  a legend.
  
  This visualizer is a base class and is not intended to be uses directly.
  Subclasses should implement a ``transform()`` method that calls ``draw()`` using
  the transformed data and the optional target as input.
  
  Parameters
  ----------
  ax : matplotlib Axes, default: None
      The axes to plot the figure on. If None is passed in the current axes.
      will be used (or generated if required).
  
  features : list, default: None
      The names of the features specified by the columns of the input dataset.
      This length of this list must match the number of columns in X, otherwise
      an exception will be raised on ``fit()``.
  
  classes : list, default: None
      The class labels for each class in y, ordered by sorted class index. These
      names act as a label encoder for the legend, identifying integer classes
      or renaming string labels. If omitted, the class labels will be taken from
      the unique values in y.
  
      Note that the length of this list must match the number of unique values in
      y, otherwise an exception is raised. This parameter is only used in the
      discrete target type case and is ignored otherwise.
  
  colors : list or tuple, default: None
      A single color to plot all instances as or a list of colors to color each
      instance according to its class in the discrete case or as an ordered
      colormap in the sequential case. If not enough colors per class are
      specified then the colors are treated as a cycle.
  
  colormap : string or cmap, default: None
      The colormap used to create the individual colors. In the discrete case
      it is used to compute the number of colors needed for each class and
      in the continuous case it is used to create a sequential color map based
      on the range of the target.
  
  target_type : str, default: "auto"
      Specify the type of target as either "discrete" (classes) or "continuous"
      (real numbers, usually for regression). If "auto", then it will
      attempt to determine the type by counting the number of unique values.
  
      If the target is discrete, the colors are returned as a dict with classes
      being the keys. If continuous the colors will be list having value of
      color for each point. In either case, if no target is specified, then
      color will be specified as the first color in the color cycle.
  
  projection : int or string, default: 2
      The number of axes to project into, either 2d or 3d. To plot 3d plots
      with matplotlib, please ensure a 3d axes is passed to the visualizer,
      otherwise one will be created using the current figure.
  
  alpha : float, default: 0.75
      Specify a transparency where 1 is completely opaque and 0 is completely
      transparent. This property makes densely clustered points more visible.
  
  colorbar : bool, default: True
      If the target_type is "continous" draw a colorbar to the right of the
      scatter plot. The colobar axes is accessible using the cax property.
  
  kwargs : dict
      Keyword arguments that are passed to the base class and may influence
      the visualization as defined in other Visualizers.
class_docstr_tok: ["The","ProjectionVisualizer","provides","functionality","for","projecting","a","multi-dimensional","dataset","into","either","2","or","3","components","so","they","can","be","plotted","as","a","scatter","plot","on","2d","or","3d","axes",".","The","visualizer","acts","as","a","transformer",",","and","draws","the","transformed","data","on","behalf","of","the","user",".","Because","it","is","a","DataVisualizer",",","the","ProjectionVisualizer","can","plot","continuous","scatter","plots","with","a","colormap","or","discrete","scatter","plots","with","a","legend",".","This","visualizer","is","a","base","class","and","is","not","intended","to","be","uses","directly",".","Subclasses","should","implement","a","``","transform","(",")","``","method","that","calls","``","draw","(",")","``","using","the","transformed","data","and","the","optional","target","as","input",".","Parameters","--","--","--","--","--","ax",":","matplotlib","Axes",",","default",":","None","The","axes","to","plot","the","figure","on",".","If","None","is","passed","in","the","current","axes",".","will","be","used","(","or","generated","if","required",")",".","features",":","list",",","default",":","None","The","names","of","the","features","specified","by","the","columns","of","the","input","dataset",".","This","length","of","this","list","must","match","the","number","of","columns","in","X",",","otherwise","an","exception","will","be","raised","on","``","fit","(",")","``",".","classes",":","list",",","default",":","None","The","class","labels","for","each","class","in","y",",","ordered","by","sorted","class","index",".","These","names","act","as","a","label","encoder","for","the","legend",",","identifying","integer","classes","or","renaming","string","labels",".","If","omitted",",","the","class","labels","will","be","taken","from","the","unique","values","in","y",".","Note","that","the","length","of","this","list","must","match","the","number","of","unique","values","in","y",",","otherwise","an","exception","is","raised",".","This","parameter","is","only","used","in","the","discrete","target","type","case","and","is","ignored","otherwise",".","colors",":","list","or","tuple",",","default",":","None","A","single","color","to","plot","all","instances","as","or","a","list","of","colors","to","color","each","instance","according","to","its","class","in","the","discrete","case","or","as","an","ordered","colormap","in","the","sequential","case",".","If","not","enough","colors","per","class","are","specified","then","the","colors","are","treated","as","a","cycle",".","colormap",":","string","or","cmap",",","default",":","None","The","colormap","used","to","create","the","individual","colors",".","In","the","discrete","case","it","is","used","to","compute","the","number","of","colors","needed","for","each","class","and","in","the","continuous","case","it","is","used","to","create","a","sequential","color","map","based","on","the","range","of","the","target",".","target_type",":","str",",","default",":","``","auto","''","Specify","the","type","of","target","as","either","``","discrete","''","(","classes",")","or","``","continuous","''","(","real","numbers",",","usually","for","regression",")",".","If","``","auto","''",",","then","it","will","attempt","to","determine","the","type","by","counting","the","number","of","unique","values",".","If","the","target","is","discrete",",","the","colors","are","returned","as","a","dict","with","classes","being","the","keys",".","If","continuous","the","colors","will","be","list","having","value","of","color","for","each","point",".","In","either","case",",","if","no","target","is","specified",",","then","color","will","be","specified","as","the","first","color","in","the","color","cycle",".","projection",":","int","or","string",",","default",":","2","The","number","of","axes","to","project","into",",","either","2d","or","3d",".","To","plot","3d","plots","with","matplotlib",",","please","ensure","a","3d","axes","is","passed","to","the","visualizer",",","otherwise","one","will","be","created","using","the","current","figure",".","alpha",":","float",",","default",":","0.75","Specify","a","transparency","where","1","is","completely","opaque","and","0","is","completely","transparent",".","This","property","makes","densely","clustered","points","more","visible",".","colorbar",":","bool",",","default",":","True","If","the","target_type","is","``","continous","''","draw","a","colorbar","to","the","right","of","the","scatter","plot",".","The","colobar","axes","is","accessible","using","the","cax","property",".","kwargs",":","dict","Keyword","arguments","that","are","passed","to","the","base","class","and","may","influence","the","visualization","as","defined","in","other","Visualizers","."]
code: def ax(self, ax):
      self._ax = ax
  
file_path: yellowbrick/yellowbrick/features/projection.py
imports: import warnings
  import matplotlib
  import matplotlib.pyplot
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  import mpl_toolkits.mplot3d
  from yellowbrick.draw import manual_legend
  from yellowbrick.features.base import DataVisualizer, TargetType
  from yellowbrick.exceptions import YellowbrickValueError, YellowbrickWarning, NotFitted
label_desc: Use image node_id 4 for calling the ProjectionVisualizer obj's underlying member method code with example usage: obj.ax(ax) without return types