0

Exactly the question above. I've recently posted a question, and the more I look at it, the more it seems like a bug to me. The upstream code base on GitHub seems pretty inactive too (for about two years), having many open issues. I'm missing some experts who could help me or even the maintainer.

Do you know whether there are good alternatives for PGFPlots which I can integrate easily into LaTeX and are quick to learn?

  • 5
    It is not dead just because there is a thing that is not working. For nice 3D graphics you can check out asymptote, for example. – mickep Jul 16 '23 at 16:55
  • 3
    I think you have to distinguish 'not maintained' from 'not working at all' – Joseph Wright Jul 16 '23 at 18:14
  • You are right, it still works in many cases, and wording this as a replacement instead of an alternative might be to harsh. – Gargantuar Jul 16 '23 at 20:28

2 Answers2

3

You are asking ...

Do you know whether there are good replacements for PGFPlots which I can integrate easily into LaTeX and are quick to learn?

I would answer that there is no good replacement that satisfies your requirements. But as already mentioned in a comment, you can have a look at Asymptote or Metapost, see here for example.

PS: I upvoted your related question so that it gets more attention.

  • I know about Asymptote for a long time, but it always intimidated me, probably for no reason or because it is a completely new external framework (although I read a few hundred pages from the pgfmanual already lol). Many textbooks I own use Asymptote (recognisable for the arrow tips ^^). – Gargantuar Jul 16 '23 at 17:16
3

First question: Is pgfplots dead? No. It's a great tool and like all tools it has its limitations. Think in terms of 1. a simple calculator with just the basic operations (addition/subtraction/multiplication/division) 2. a scientific calculator (giving trig functions, logarithms, etc) 3. a graphing calculator (like TI calculators in high school) 4. A computer algebra system (CAS) like Mathematica or SAGE. A simple calculator isn't dead because it gives wrong answers to some problems and is useless in solving other problems. You'll find they are still widely used in some asian markets as they can cheaply do what is expected from them. A similar argument applies to other calculators; they have a time and place. Even a CAS has limitations but that doesn't stop us from using them. When you bump up against limit you just need to figure out what option will work best for your situation.

A lot the mathematical capabilities in LaTeX have increased dramatically over the last decade or so and pgfplots is good enough for most users. You (like me) have bumped up against some of the limitations of calculations/plotting in LaTeX. This brings us to your second question: "Do you know whether there are good replacements for PGFPlots which I can integrate easily into LaTeX and are quick to learn?". The short answer is no, so now you have to figure out the option that works best for you. Some have suggested Asymptote but since your profile says you are a mathematics student I think you will appreciate using sagetex, SAGE, and Cocalc. With respect to your linked posted question, you can go to a SAGE cell server and copy/paste the code below:

x, y = var('x y')
cm = colormaps.jet
def cf(x,y): return (2+sqrt(x)*sin(y/2))/4
parametric_plot3d((x*cos(y),x*sin(y),sqrt(x)*cos(y/2)), (x,0,4),(y,-pi,3*pi),mesh=True, color=(cf,cm))

Press Evaluate and you'll get something like this (done using a SAGE app on Ipad): enter image description here

You can reach into the picture and rotate it (not here, with the SAGE cell server or SAGE app). Notice the little I in the bottom right corner, pressing this gives more options (for example, download the picture as a .png file). The line def cf(x,y): return (2+sqrt(x)*sin(y/2))/4 is defining color value given a particular (x,y) pair. The line below it includes color=(cf,cm) which uses the value of cf under the colormap cm = colormaps.jet to create the color. Nothing particularly difficult in understanding the code but you will need lots of time to read the instructions. The documentation for just graph theory is 1219 pages. A free book can help speed up the process dramatically. As a CAS, SAGE will have the least mathematical limitations. It also has a lot of mathematics built into (derivatives, graph theory, matrices, etc). Yet another bonus, SAGE gives you access to Python; see my answer to plotting the Weierstrass function which used Python programming. Search this site for lots of other sagetex examples.

DJP
  • 12,451