graphorge.ioput.plots.scatter_xy_data

scatter_xy_data(data_xy, data_labels=None, is_identity_line=False, identity_error=None, is_r2_coefficient=False, is_direct_loss_estimator=False, is_marginal_dists=False, is_error_bar=False, range_type='min-max', x_lims=(None, None), y_lims=(None, None), title=None, x_label=None, y_label=None, x_scale='linear', y_scale='linear', x_tick_format=None, y_tick_format=None, is_latex=False)[source]

Scatter data in xy axes.

Parameters:
  • data_xy (numpy.ndarray(2d)) – Data array where the plot data is stored columnwise such that the i-th data set (x_i, y_i) is stored in columns (2*i, 2*i + 1), respectively.

  • data_labels (list, default=None) – Labels of data sets (x_i, y_i) provided in data_xy and sorted accordingly. If None, then no labels are displayed.

  • is_identity_line (bool, default=False) – Plot identity line.

  • identity_error (float, default=None) – Relative error between x-data and y-data defining a symmetric error-based shaded area with respect to the identity line.

  • is_r2_coefficient (bool, default=False) – Plot coefficient of determination. Only effective if plotting a single data set: reference data stored in data_xy[:, 0] and prediction data stored in data_xy[:, 1].

  • is_direct_loss_estimator (bool, default=False) – Plot Direct Loss Estimator (DLE) based on Linear Regression model. Only effective if plotting a single data set: reference data stored in data_xy[:, 0] and prediction data stored in data_xy[:, 1].

  • is_marginal_dists (bool, default=False) – Plot marginal distributions along both dimensions. Multiple data sets are concatenated along each dimension.

  • is_error_bar (bool, default=False) – If True, then plot error bar according with range type. Multiple data sets are concatenated and the x values are assumed common between all data sets. Data labels are suppressed.

  • range_type ({'min-max', 'mean-std', None}, default='min-max') – Type of range of y-values to be plotted for each x-value around the mean. If None, only the mean is plotted. Only effective if is_error_bar is set to True.

  • x_lims (tuple, default=(None, None)) – x-axis limits in data coordinates.

  • y_lims (tuple, default=(None, None)) – y-axis limits in data coordinates.

  • title (str, default=None) – Plot title.

  • x_label (str, default=None) – x-axis label.

  • y_label (str, default=None) – y-axis label.

  • x_scale (str {'linear', 'log'}, default='linear') – x-axis scale. If None or invalid format, then default scale is set. Scale ‘log’ overrides any x-axis ticks formatting.

  • y_scale (str {'linear', 'log'}, default='linear') – y-axis scale. If None or invalid format, then default scale is set. Scale ‘log’ overrides any y-axis ticks formatting.

  • x_tick_format ({'int', 'float', 'exp'}, default=None) – x-axis ticks formatting. If None or invalid format, then default formatting is set.

  • y_tick_format ({'int', 'float', 'exp'}, default=None) – y-axis ticks formatting. If None or invalid format, then default formatting is set.

  • is_latex (bool, default=False) – If True, then render all strings in LaTeX. If LaTex is not available, then this option is silently set to False and all input strings are processed to remove $(…)$ enclosure.

Returns:

  • figure (Matplotlib Figure) – Figure.

  • axes (Matplotlib Axes) – Axes.