graphorge.gnn_base_model.train.training_plots.plot_xny_data

plot_xny_data(data_xy_list, range_type='min-max', is_error_bar=False, is_error_shading=True, data_labels=None, is_reference_data=False, 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]

Plot data in xy axes with given range of y-values for each x-value.

Parameters:
  • data_xy_list (list[np.ndarray(2d)]) – List of data arrays. Each data array contains plot data stored columnwise such that data_array[:, 0] holds the x-axis data and data_array[:, 1:] holds the y-axis data.

  • 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.

  • is_error_bar (bool, default=True) – If True, then plot error bar according with range type.

  • is_error_shading (bool, default=False,) – If True, then shade error according with range type.

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

  • is_reference_data (bool, default=False) – If True, then the first data set is assumed to be the reference and is formatted independently (black, dashed, on top). Reference data is ignored for the range computation.

  • 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.