I’m iteratively making figures in a for-loop.
I tried to make a list of figures and iterate over them, expecting them to be unique objects and therefore distinct figures, but when I generate and save the figures, they incrementally have axes duplicated for every subsequent figure in the list.
list = []
for i in range(0, num_jumps): list.append(pygmt.Figure())
for jumpNum in range(0, num_jumps):
fig = list[i]
# do stuff to fig
Any idea or ways to clear it? Ideally I’d just use one fig object and clear it every iteration, but if there’s a way to do it via the way I’m trying to do above that’s fine too.
