4 ms·
Nice book. But frankly Tikz and pgfplots are better for scientific visualization, unless your plot is too complex (in which case you have to settle for a lower
by aborsy 2y ago
Nice book. But frankly Tikz and pgfplots are better for scientific visualization, unless your plot is too complex (in which case you have to settle for a lower quality plot).
- jtrueb 2y agoHow do you use those outside of Latex? Lots of figures are coming from Matlab or Python, where Latex is a non-starter. Is there a cookbook to pollinate?
- aborsy 2y agoYou export figure in PDF or some other format.
- adityamwagh 2y agoTikZ has a steep learning curve and felt so convoluted when I tried to use it.
- whatever1 2y agoGreat use case for llms?
- semi-extrinsic 2y agoI would actually be very surprised if that is true. tikz is one of those examples (like e.g. M4 macros or assembly code or OpenSCAD) where producing working code requires significant mental arithmetic. Most skilled humans need to write down intermediate calculations on a piece of paper. If you don't believe me, look at the "tikz unicorn" of GPT4 demo fame. Then try to replicate that with the currently available "degraded because of safety" GPT4 versions. Then ask yourself how on Earth you could use that to produce publication quality graphics.
- svantana 2y agoI tried the "Draw a unicorn in TiKZ" in chatGPT now, and it actually looks even better than in that paper, and the code is very clean too. Not surprising as the quality of outputs from chatbots have steadily improved in the ~17 months since.
- atrettel 2y agoTikZ does have a steep learning curve and can get pretty convoluted, but once you get a hang of it, you have a tremendous amount of control over what you are doing. I sometimes feel like TikZ is more like TeX instead of LaTeX given how primitive it can be, but it can be quite powerful if you give it enough time.
- setopt 2y agoMatplotlib is very easy to customize via “style sheets”, so you can make it match any style you want. Note that you can even turn on the “usetex” option and provide a preamble to compile all text/equations via TeX.
- aborsy 2y agoNo doubt it’s very customizable. But the display quality seems to me not as good as even matlab. At least with defaults, which is a bit barebones. You have to work on it . The syntax of python is also a bit verbose. Like, why do we need plt.show(), when I plot a figure obviously I want to plot it! Now I know, the point is, see matlab, gnuplot etc. Compare with the default plot of gnuplot. The limitation of latex is you can’t do much calculation with data, and memory usage. Don’t get me wrong, I still sometimes go to python for plotting. But it’s general purpose programming language, and for specific applications there are custom tools.
- setopt 2y agoDon’t get me wrong either – I personally prefer Gnuplot by quite a margin, Matplotlib is indeed too verbose. These days I use Matplotlib more mainly because I use Python more. I’m just saying that it doesn’t take too much configuration to make publication-quality plots in Matplotlib either, by e.g. enabling the TeX integration and setting up a reusable stylesheet file. The style sheet format is actually very reasonable, and several examples ship with Matplotlib. There’s also the Seaborn package if you want some nicer default stylesheets. (Side note, the same goes for Gnuplot… As shown by e.g. gnuplotting.org you can definitely create publication-quality plots there as well.)
- davrosthedalek 2y agognuplot + tikz terminal. I have yet to see better looking figures. And technically, it's one of the rare if not the only one solution that can give you bibtex resolved citations in figure labels.... (Don't do it, the journals hate it)
- Keysh 2y ago
- bsdz 2y agoYou can use matplotlib's pgf backend for direct use in latex. That said, not sure I agree that's better for scientific viz. Perhaps in the past. Also tikz/pgf is much more fiddly and has it's limitations too (imho).