Next: Question 8: How Up: Some Maple Questions and Previous: Question 6: I

Question 7: Can I print Maple graphs (2D or 3D) even if I don't have a graphics terminal?

Answer: Yes. Maple supports graphic output for many printers and on many platforms, including imagen 300, DEC ln03, pic, PostScript and Macintosh plot (for use with MacMaple). Even if you're working at an ASCII terminal you can produce two dimensional character plots. The most common way of producing a high-quality paper copy of a graph is through PostScript. Here's an example of how to do this.


> interface(plotdevice=postscript);
> interface(plotoutput=myfile);
> K:=(n,t) -> 1/(n+1)*(sin((n+1)*t/2)/sin(t/2))^2;
                                                       2
                                     sin(1/2 (n + 1) t)
                       K := (n,t) -> -------------------
                                                       2
                                     (n + 1) sin(1/2 t)

> plot({seq(K(n,t),n=1..8)},t=-Pi..Pi,title=`Fejer Kernel`);
A PostScript version of the plot is placed in the file myfile. It can then be printed on any PostScript printer. The actual command to send the file to the printer varies from system to system.
The resulting plot, is a plot of the first 8 functions in the Fejer summability kernel (important in theoretical Fourier analysis).
Three-dimesional plots can be produced in exactly the same way (just use a plot3d command instead of a plot command).
Related help files include: plot, plot3d, interface, plotsetup, plot[device], seq .


gagin@thsun1.jinr.ru