Looking for software for plotting exact and beautiful (function-)graphs

I am looking for some software producing beautiful and exact pictures of functions, plots, etc. I really love those images in the german textbook “Höhere Mathematik 1(2)”, Meyberg, Vachenauer:

And this one (created with POV-Ray) is truly beautiful, too:

So—besides from using POV-Ray—what software is being used to produce high quality, clear, mathematical exact and beautiful graph plots etc?

If you are familiar with Python coding, you can easily use matplotlib to get quite good outputs. The library's website has some demos. This also is a pretty good/easy way to produce animations, if you can generate the frames from an algorithm. I threw together this animation with about 150 lines of actual code (not counting comments and blank lines).

Personally I usually use Asymptote which has a C-like syntax and readily integrates into LaTeX (for example, I can make sure that the generated images use exactly the same font sets as my main document). You can take a look at their gallery for the type of things you can do. The figure on page 5 of this paper is made using it.

If the object you want is parametrized, then many of the usual computer algebra packages (Mathematica, Maxima, MatLab) can be used to get pretty decent quality plots; to get them to look "right" you have to play a bit with the configuration parameters.

The software surf was designed for drawing algebraic surfaces; unfortunately it has not been updated for over a decade and I don't actually know for sure whether it still builds on modern machines.

Mathematica has impressive graphics capabilities. Here is an example taken from an expert's answer at Mathematica StackExchange (Vitaliy Kaurov):

For more examples, see the many Wolfram Demonstrations.

Gnuplot is widely used in academia.
It can plot in 2D and 3D, both analytical functions and numerical data. While the command line interface might be a little intimidating at first, you can use it as simple as plot sin(x) or plot 'data.txt'. All the options to finetune the looks can be accessed through the GUI if you don't remember the name of something and of course you can save all the commands in a textfile to quickly replicate the plot later.
It also supports LaTeX and can output to an interactive window, bitmap- or vector graphic formats.
Another very convenient feature is being able to fit arbitrary functions, so you can plot the data and the model with fitted parameters in one go.

Here are some the examples of what it can do:

• As you are familiar with both matplotlib and gnuplot, would you be able to give an opinion on their strengths/weaknesses? – Richard Mar 18 '15 at 22:50
• Looking through the matplotlib gallery you notice that most of the examples are 2D plots. Although it can create 3D plots, this is not as polished as other programs, until recently it lacked log-scaling in 3D plots and (dont know if this one is already fixed) depth-ordering with multiple intersecting surfaces doesnt work. – DenDenDo Mar 19 '15 at 1:46
• Like Gnuplot most plot options are turned on/off globally and affect all subsequently drawn elements, unlike gnuplot you can create plot objects and modify their properties individually (which may be a little confusing since there are multiple ways to do the same thing and tutorials may be using one or the other approach). If you only need 2D- or simple 3D plots, there is no difference, you can do anything you want with both tools. If the data is already available, then gnuplot might be better, if you create the data yourself (in Python) or need to manipulate it, then matplotlib is better – DenDenDo Mar 19 '15 at 1:46

I've used iPython with matplotlib.

It has a basic mode which mimics matlab, but it has facilities to make many kinds of graphs/diagrams easier. It does not have full 3D, just 2.5D, which is limiting for nicely shaded 3D graphics, but fine for most graphs and diagrams.

It would be perfect for creating your final animation graph. As it is programatic, it is easy to create a series of graphs with a slowly varying perspective or parameter, saving each as an image, and then use ImageMagick or other program to turn it into a gif.

Its default output is not as smooth and pretty as a modern spreadsheet program, but it is very flexible, and fast to use if you know how. For an important image I would use the matplotlib for the diagrams without text, and then use a basic image editing program to add text and any effects.

With numpy for calculating, it is very easy to do basic graphs. If you know some python programming you can do almost anything.

I wrote a little physics graphics library for my students to use for their physics projects. The following is a student's work showing his analysis of a star's position data. It is not as pretty as it could be, but it shows what is possible. It is constructed by overlaying 2 line plots, 2 scatter plots, and 3 vector plots. Colours are set for each item of the plot to show the passing of time.

It is not as pretty as it could be, but it gives an indication of what is possible.

Here is a gallery of the type of thing that can be done with matplotlib. http://matplotlib.org/gallery.html

• What Mathematica can do, Python can too! Since v1.3 matplotlib.pyplot has a built-in xkcd() function which turns XKCD-style on/off for subsequent plots http://matplotlib.org/xkcd/gallery.html – DenDenDo Mar 18 '15 at 19:34

Mathematica has been suggested here, but if you want a free alternative, you could try Sage. It's an Open Source program that combines lots of existing open source mathematics programs into one interface. It is also possible to use Sage online, for example here, so you don't have to install anything. You can also easily integrate these graphs and calculations into your website and allow people to change parameters.

One possibility would be to use tikz and pgfplots within $\LaTeX$. Within the preamble say

\usepackage{pgfplots}
\usetikzlibrary{arrows,shapes,trees}    %some tikz extensions