Erina
Erina

Reputation: 33

tikzplotlib to save multiple images in python

I need to use the tikzplotlib library to save images that are generated from my python code, but I can't seem to find a way to save the images that are being created within a for loop.

I searched online but couldn't seem to find a solution that uses this library. Can someone help me please?

Thanks :)

Upvotes: 0

Views: 345

Answers (1)

Erina
Erina

Reputation: 33

Never mind, I found a solution:

for i in range(5):
    # define the graph/image you want to save
    a = str(i) + '.tex'
    tikz_save(a)

This will save all the images you need in your loop :)

Upvotes: 1

Related Questions