0

I have a preconstructed figure f = Figure(figsize=(6.4,8.2)) created for a tkinter GUI - usually to plot on this figure I use f.add_subplot and f.draw() to update the figure.

In order to have more customisation over a certain group of plots I need to create a new figure rather than adding subplots to this old one. Is there any way I can put a figure inside a figure, i.e. get f.draw() to draw fig.


fig, axes = plt.subplots(nrows=2, ncols=3, sharex=True, sharey=True)
for i, ax in enumerate(axes.flat):
    contourplot = ax.contourf(A,B, mag[i])

Sam
  • 3
  • 2
  • Does this answer your question? [Embedding small plots inside subplots in matplotlib](https://stackoverflow.com/questions/17458580/embedding-small-plots-inside-subplots-in-matplotlib) – NStavrakoudis Mar 30 '21 at 14:52
  • If you are willing to use latest matplotlib 3.4, subfigures are a brand new feature: https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subfigures.html – Jody Klymak Mar 30 '21 at 15:05
  • This might be what I am after @JodyKlymak , after a bit more searching this looks like a tkinter issue where the figure can only be updated using add_subplots, this may present a workaround though – Sam Mar 30 '21 at 15:32

0 Answers0