0

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 :)

3
  • Nevermind, I found a solution: a = str(i) + '.tex' tikz_save(a) Commented Mar 9, 2018 at 10:12
  • If you post that as an answer then someone else with the same problem might be able to find it more easily :) Commented Mar 9, 2018 at 10:15
  • @AriCooper-Davis thanks for reminding me, just posted :) Commented Mar 9, 2018 at 11:30

1 Answer 1

1

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 :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.