Norman Ramsey
Norman Ramsey

Reputation: 202585

How do PStricks and TikZ compare for ease of learning and for quality of API design?

My group uses Literate Programming for most of our source code---this means that internal documentation is written using LaTeX. We have been using PStricks for fancy technical diagrams of the system, but have recently been recommended to use TikZ. I've gathered this information:

I'm interested in the answers to two questions. If you wish, feel free to post one answer per question:

To make a compelling argument why one API is better than another, you may want to resort to examples.

Upvotes: 26

Views: 14184

Answers (5)

LaTeX
LaTeX

Reputation: 1421

I am developing an asp.net application working with Miktex distribution installed on the server.

The application will generate math problems and produces pdf files to be downloaded by the visitor. The math problems contain some jpeg images and mathematical diagrams.

I was confused whether to use PSTricks or Tikz. After benchmarking the application, I must use Tikz because it needs only one compilation step using pdftex. So Tikz wins in this scenario. :D

Note: I hope my answer matches your question :D

Upvotes: 2

Joel Berger
Joel Berger

Reputation: 20280

As a fond user of TikZ I have been having this debate with a professor in my physics department who loves pstricks and I think we have come to a conclusion as I have stated in other posts. Absent a few times when dipping into the PS itself, TikZ and pstricks are very comparable in most ways. The extensibility and compatibility of TiKZ is appealing leading us to agree that:

  • We think that new users should learn TikZ.
  • Old hands at pstricks probably wont gain enough from the switch and may not be worth doing.

Hopefully that helps!

Upvotes: 11

brandon
brandon

Reputation: 21

I've only ever used PSTricks, but I've made it do everything I want it to do. Tikz has a great-looking manual and is clearly very powerful. There are two things that I would want out of a drawing system that I can't do with PSTricks: feathered edges (which Tikz can do), and I can't remember the other thing. OP was asking about 'ease of learning': PSTricks certainly requires some trial and error, and I think some coding discipline which I'm not very good at. But \rput is pretty central to how I use PSTricks.. I can't imagine being without it.

On the other hand, 'decorations' look pretty neat. I like the 'saved from trash' example on page 210 (!) of the (560 pp. total) manual. I don't like the fact that Tikz seems to use an entirely different notation -- I don't recognize LaTeX in it which makes it seem foreign and weird. The manual looks beautiful, though. The transparency and 'fade' effects seem very powerful .. can that be done in pstricks? .. but I doubt that I would ever use them. Tikz seems a bit more on the "drawing" end of things. As a rule, I don't make drawings, I make figures.

Can you do arithmetic on coordinates? I'd have to start over and learn from scratch to use Tikz, which is a tough sell if I'm not even sure what I would get out of it.

Upvotes: 2

John
John

Reputation: 19

I think pstricks is superior. TikZ doesn't even have a good way of translating coordinates, like the rput/uput/Aput/Bput pstricks commands. You can use xshift and yshift, but these require units (!), so scaling the image will require manually shaling every xshift/yshift call.

Upvotes: 1

pts
pts

Reputation: 87311

Quick answer: I prefer TikZ to pstricks because I think TikZ

  • is better designed
  • is easier to learn
  • is compatible with pdftex
  • gives you more power and abstraction (you don't have to specify as many coordinates by hand)
  • lets you create more beautiful graphics with the same effort
  • it is easier to extend using TeX programming (it was designed from the ground up with extensibility in mind)

For the users of pstricks, I'd recommend writing all new documents using TikZ in the future. For the users of METAPOST, if their graphics don't use linear equation solving, I'd recommend TikZ. If the METAPOST graphics needs linear equation solving, I'd suggest trying Asymptote.

pstricks does indeed give you the power of PostScript, but it is not PostScript which makes your graphics authoring powerful, but it is abstraction: the use of automatic positioning, automatic intersection calculations, and display style templates. TikZ gives you powerful abstractions, even if you are not a programmer, or you are not willing to program this time.

I don't have experience writing TikZ extensions, but from a quick glimpse of the TikZ source code, it seems to be easy to understand and extend, compared to other TeX macro packages I came across.

Upvotes: 18

Related Questions