etna icon indicating copy to clipboard operation
etna copied to clipboard

Add `title` parameter to plots, make plots return figures

Open Mr-Geekman opened this issue 2 years ago • 0 comments

🚀 Feature Request

We want to add title for plots in etna.analysis.

Proposal

  1. Find out whether plt.show() is necessary and if not, remove it from all the plots. This makes saving the plots impossible.
  2. Make all plots return matplotlib.figure.Figure (it is enought, because with it you can access axes with fig.axes). Don't forget about TSDataset.plot.
  3. Add parameter title to plots in etna.analysis.plotters and set some default value.
  • with a lot of plots that are using prepare_axes you can set plot with fig.suptitle
  • remain only segment title for distinct subplot in plot_correlation_matrix, plot_feature_relevance, plot_periodogram
  1. Add parameter title to plots in etna.analysis.eda_utils and set some default value
  • with a lot of plots that are using prepare_axes you can set plot with fig.suptitle
  • pay attention to stl_plot: it differs from others
  1. Add parameter title for TSDataset.plot and set some default value.

Test cases

  1. Make sure existing tests passes.
  2. Rerun notebooks with plots if necessary.
  3. Rerun readme example if necessary.

Additional context

No response

Mr-Geekman avatar Jul 13 '22 13:07 Mr-Geekman