Skip to content

Clean up pack_exploration.

Caspar Jungbacker requested to merge caspar_fix into main

I cleaned up the time_plot and hist_plot commands, to make the code a bit more readable. The way the user interacts with the functions in a notebook has not changed, so existing code should not break.

Furthermore:

  • time_plot and hist_plot now return the figure and the axes, allowing the user to interact with the figure after plotting (for example changing labels, ticks, et cetera);
  • If the plotting is done using together=False, a single figure containing multiple subplots is made. Previous behavior was to create a new figure for each variable, but that only allows the user to interact with the last figure that is made.
  • When the user uses the plot commands with together=True, the names of the variables are placed in the legend, and not in the title of the plots (previously, the names of the variables were placed in the title, making the title very long if a lot of variables were plotted). If the user uses together=False, then subplots are created, and the name of each variable is placed in the corresponding subplot. No legend appears in that case.

Merge request reports