osyris.plot

Contents

osyris.plot#

osyris.plot(x, *y, logx=False, logy=False, loglog=False, filename=None, title=None, xmin=None, xmax=None, ymin=None, ymax=None, legend=True, ax=None, **kwargs)#

Make a 1D plot with two variables as input.

This function has an API very close to that of matplotlib’s scatter function. For the documentation of any parameters that are not listed below, see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html.

Parameters:
  • x (Array) – Array to use for x positions along the horizontal dimension.

  • y (Array | dict) – Array(s) to use for y positions along the vertical dimension.

  • logx (bool) – If True, use logarithmic scaling on the horizontal axis. Default is False.

  • logy (bool) – If True, use logarithmic scaling on the vertical axis. Default is False.

  • loglog (bool) – If True, use logarithmic scaling on the horizontal and vertical axes. Default is False.

  • filename (str | None) – If specified, the returned figure is also saved to file. Default is None.

  • title (str | None) – The title of the figure. Default is None.

  • xmin (float | None) – Minimum value for the horizontal axis. Default is None.

  • xmax (float | None) – Maximum value for the horizontal axis. Default is None.

  • ymin (float | None) – Minimum value for the vertical axis. Default is None.

  • ymax (float | None) – Maximum value for the vertical axis. Default is None.

  • ax (object | None) – A matplotlib axes inside which the figure will be plotted. Default is None, in which case some new axes a created.

Return type:

Plot