I am trying to wrap numerous plots together, as they are closely related (showing density using 1 continuous and 1 categorical variable, broken down by day of the week, where each day is a different plot). In R, I can either use grid.arrange()
from gridExtra
or facet_wrap
to wrap visualizations together to return to the user as 1 variable and image containing all plots. It looks like this:
How do I do this in Python?
Yes, this can be done using matplotlib subplots. See this example.
The layout of the visualization can be initialized with the desired number of rows and columns. Each cell will contain a different subplot.
fig, axes = plt.subplots(nrows=3, ncols=2, figsize=(7, 7))