plot_scatter_xy (pyleoclim.utils.plotting.plot_scatter_xy)

pyleoclim.utils.plotting.plot_scatter_xy(x1, y1, x2, y2, figsize=None, xlabel=None, ylabel=None, title=None, xlim=None, ylim=None, savefig_settings=None, ax=None, legend=True, plot_kwargs=None, lgd_kwargs=None, mute=False)[source]

Plot a scatter on top of a line plot.

Parameters
  • x1 (array) – x axis of timeseries1 - plotted as a line

  • y1 (array) – values of timeseries1 - plotted as a line

  • x2 (array) – x axis of scatter points

  • y2 (array) – y of scatter points

  • figsize (list) – a list of two integers indicating the figure size

  • xlabel (str) – label for x-axis

  • ylabel (str) – label for y-axis

  • title (str) – the title for the figure

  • xlim (list) – set the limits of the x axis

  • ylim (list) – set the limits of the y axis

  • ax (pyplot.axis) – the pyplot.axis object

  • legend (bool) – plot legend or not

  • lgd_kwargs (dict) – the keyword arguments for ax.legend()

  • plot_kwargs (dict) – the keyword arguments for ax.plot()

  • mute (bool) –

    if True, the plot will not show;

    recommend to turn on when more modifications are going to be made on ax (going to be deprecated)

  • savefig_settings (dict) –

    the dictionary of arguments for plt.savefig(); some notes below: - “path” must be specified; it can be any existed or non-existed path,

    with or without a suffix; if the suffix is not given in “path”, it will follow “format”

    • ”format” can be one of {“pdf”, “eps”, “png”, “ps”}

Returns

ax

Return type

the pyplot.axis object

See also

pyleoclim.utils.plotting.set_style

set different styles for the figures. Should be set before invoking the plotting functions

pyleoclim.utils.plotting.savefig

save figures

pyleoclim.utils.plotting.showfig

equivalent to plt.show(). Platform-dependent