Points.plotStatistics

Points.plotStatistics(statistic, points=None, horizontal=False, outPath=None, show=True, figureID=None, title=True, xAxisLabel=True, yAxisLabel=True, legendTitle=None, **kwargs)

Bar chart comparing an aggregate statistic between points.

The bars in the plot represent the output of the statistic function applied to each point. Typically, functions return a single numeric value, however, the function may return a point vector. In that case, each feature in the object returned by statistic is considered to be the heights of separate bars for that point. Bars will be grouped by each point and bar colors indicate each feature. If multiple bar colors are necessary, a legend mapping the featureName (when available) or feature index to its bar color will be added.

Parameters:
  • statistic (function) – Functions take a point view the only required argument. Common statistic functions can be found in nimble.calculate.

  • points (list of identifiers, None) – List of point names and/or indices to plot. None will apply to all points.

  • horizontal (bool) – False, the default, draws plot bars vertically. True will draw bars horizontally.

  • 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, bool) – The title of the plot. If True, a title will automatically be generated.

  • xAxisLabel (str, bool) – A label for the x axis. If True, a label will automatically be generated.

  • yAxisLabel (str, bool) – A label for the y axis. If True, a label will automatically be generated.

  • legendTitle (str, None) – A title for the legend. A legend is only added when multiple bar colors are necessary, otherwise this parameter is ignored. None will not add a title to the legend.

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

Keywords: bar chart, display, visualize, graphics