Drawing LaTex/Tikz Picture via GPT-4
Xiang Huang / 2023-08-30
I am a subscriber of GPT-4. Today I learned that you don’t need to pay to get access to access Bard, and Bard accepts picture (given as a link) as input. The first things I want to try is to ask Bard to draw LaTex/Tikz picture for me, for that is what I will need for papers. But life is busy enough without learning Tikz commands already, I never properly learn Tikz enough.
The result? Very disappointing. Bard does not know what it is doing. It gave me some code supposed to draw some random pictures from chegg.com, a site I hate for obvious reason as a teacher. It does not understand the picture at all.
Then it comes me to test it out on GPT-4. However, GPT-4 does not accept picture as links. But instead you can describe the graph you try to draw in words. After all, it is a language model. (I doubted that I could describe a graph in English very well. Good luck, GPT-4.)
The result? Astonishingly well! Here is the conversation I had with GPT-4.
The target picture I try to draw is the following, something I picked up randomly on StackExchange.

Round 1: My bad. I did not describe the picture very well. (I said it was going to be hard for me, right?)

Round 2: Maybe I was me not saying it very well or GPT-4 forgot to connect the last link in a cycle.

Round 3: Looks very good now. But the lines goings through the center circle bug me.

Round 4: Ha, now every circle has lines going through.

Round 5: Fixed!

Round 6: Let’s fill some grey-ish color.

Conclusion
GPT-4 can help drawing picture via LaTex/Titz. It is going to be very helpful especially if you know some Tikz commands, but are not so confident in using it because of the feeling of unfamiliarity (Trust me, I am on the same boat). Of course, you might want to use some what-you-see-is-what-you-get tool for that purpose. For that I recommend Mathcha.io. I really hope that someday it is so developed to equip with a more powerful version of ChatGPT to help the picture drawing. You can then drag your mouse to draw if you want, at the same time you can also describe the picture and ask ChatGPT to update it for you. I hope that day is not too far away.
