scatter_plot#
- deepinv.utils.scatter_plot(xy_list, titles=None, save_dir=None, tight=True, show=True, return_fig=False, figsize=None, subtitles=None, suptitle=None, cmap='gray', fontsize=None, s=0.1, linewidths=1.5, color='b')[source]#
Plots a list of scatter plots.
Example usage:
import torch from deepinv.utils import scatter_plot xy = torch.randn(10, 2) scatter_plot([xy, xy], titles=["scatter1", "scatter2"], save_dir="test.png")
- Parameters:
xy_list (list[torch.Tensor], torch.Tensor) – list of scatter plots data, or single scatter plot data.
subtitles (list[list[str]], list[str], str, None) – list of subtitles for each image, can be either the same length or the same shape as img_list.
titles (list[str]) – list of titles for each image, has to be same length as img_list.
save_dir (None, str, pathlib.Path) – path to save the plot.
tight (bool) – use tight layout.
show (bool) – show the image plot.
return_fig (bool) – return the figure object.
suptitle (str) – title of the figure.
cmap (str) – colormap to use for the images. Default: gray
fontsize (int) – fontsize for the plot. Default: 17
s (float) – size of the scattered points. Default: 0.1
linewidths (float) – width of the lines. Default: 1.5
color (str) – color of the points. Default: blue