The benefits and demerits of using one versus the other? Which one beautiful for plotting graphics? What is advantages and disadvantages?
2 Answers
I have been using PSTricks for more than 10 years, and was overall very happy with it. It is a great tool, which allows you to do most of the things you want.
Nonetheless, in the year 2020, with pgfplots around, I think that there is only one recommendation one can make:1
pgfplots
Why? Here are a few reasons, the list is by far not exhaustive.
- You are not restricted in your choice of compiler. In particular, you can upload the code to the arXiv.
- It uses pgf keys, which is arguably the most powerful key management system LaTeX currently offers. In particular, with its styles
pgfplotscodes are easier to maintain in the sense that if you decide to change your conventions, this is a simple switch rather than a major headache. - It is much easier to get things parsed.
One should say that PSTricks has been developed over many years, and there are quite a few macros and tools around that lead to shorter codes in specific situations, which have been foreseen by the authors of these macros and tools. Some of them have no counter parts in the TikZ world, at least not in form of maintained packages, an example being the solution of differential equations. However, it is probably fair to say that once you want to go beyond what has been foreseen, it is very hard to get going with PSTricks (unless you know postscript). With pgfplots it is usually straightforward to go beyond standard applications, and all you need to know is pgf and (La)TeX coding. As a rule of thumb, whenever I convert old pspicture codes to TikZ or pgfplots, the code shrinks by a factor 2-3, yet there are a few counterexamples.
1Note that this discussion only concerns PSTricks vs. pgfplots. It does not cover other tools like asymptote.
The PGF manual states (p20 in version 2.10):
The PSTricks package is certainly powerful enough to create any conceivable kind of graphic, but it is not portable at all. Most importantly, it does not work with pdftex nor with any other driver that produces anything but PostScript code.
Compared to PGF, PSTricks has a broader support base. There are many nice extra packages for special purpose situations that have been contributed by users over the last decade.
Note that a number of neat tricks that PSTricks can do are impossible in PGF. In particular, PSTricks has access to the powerful PostScript programming language, which allows trickery such as inline function plotting.
- 46,933
pgfplots. But this is an opinion.) – Jun 09 '20 at 20:38pgfplotsis based onpgf-tikzpackage, and here is questions comparingpgf-tikzwithpstricks: Fundamental differences : PSTricks, TikZ/PGF and others and What are the advantages of TikZ/PGF over PSTricks?. – muzimuzhi Z Jun 10 '20 at 10:39