Base.plotFeatureAgainstFeature

Base.plotFeatureAgainstFeature(x, y, groupByFeature=None, trend=None, outPath=None, show=True, figureID=None, title=True, xAxisLabel=True, yAxisLabel=True, xMin=None, xMax=None, yMin=None, yMax=None, **kwargs)

A plot of the pairwise combination of feature values.

Control over the width of the both axes is given, with the warning that user specified values can obscure data that would otherwise be plotted given default inputs. Keyword arguments for matplotlib.pyplot’s plot function can be passed for further customization of the plot.

Parameters:
  • x (identifier) – The index or name of the feature from which we draw x-axis coordinates.

  • y (identifier) – The index or name of the feature from which we draw y-axis coordinates.

  • groupByFeature (identifier, None) – An optional index or name of the feature that divides the x and y values into groups. Each group will be plotted with a different color and a legend will be added. To use custom colors provide a dictionary of labels mapped to matplotlib color values as the ‘color’ keyword argument.

  • trend (str, None) – Specify a trendline type. Currently “linear” is the only supported string option. None will not add a trendline.

  • outPath (str, None) – A string of the path to save the current figure.

  • show (bool) – If True, display the plot. If False, the figure will not display until a plotting function with show=True is called. This allows for future plots to placed on the figure with the same figureID before being shown.

  • figureID (hashable, None) – A new figure will be generated for None or a new id, otherwise the figure with that id will be activated to draw the plot on the existing figure.

  • title (str, None) – The title of the plot. If True, the title will identify the two features presented in the plot.

  • xAxisLabel (str) – A label for the x axis. If True, the label will be the x feature name or index.

  • yAxisLabel (str) – A label for the y axis. If True, the label will be the y feature name or index.

  • xMin (int, float) – The minimum value shown on the x axis of the resultant plot.

  • xMax (int, float) – The maximum value shown on the x axis of the resultant plot.

  • yMin (int, float) – The minimum value shown on the y axis of the resultant plot.

  • yMax (int, float) – The maximum value shown on the y axis of the resultant plot.

  • kwargs – Any keyword arguments accepted by matplotlib.pyplot’s plot function.

Keywords: graph, scatter, line, chart, relationship, figure, image, graphics, visualization