Initial release of Maemo 5 port of gnuplot
[gnuplot] / demo / epslatex.dem
1 #
2 # $Id: epslatex.dem,v 1.2 2005/08/08 09:13:02 mikulik Exp $
3 #
4 # This file demonstrates new features in gnuplot 4.1
5 print "\n This file demonstrates how to use the epslatex terminal."
6 print " It will generate two files: epslatex-inc.eps and epslatex.tex."
7 print " \nIf the file gnuplot.cfg is found by LaTeX it will be loaded"
8 print " and can be used for further settings, e.g., here it provides"
9 print " the package exscale.sty which enlargens the integral sign.\n"
10 pause -1 "Hit return to continue"
11 #
12 xmin=-270.
13 xmax=270.
14 ymin=-1.1
15 ymax=1.2
16 #
17 reset
18 set terminal push
19 set terminal epslatex standalone linewidth 2 rounded \
20   dashlen 4 color '' 12
21 set output 'epslatex.tex'
22 unset autoscale
23 set xr [xmin:xmax]
24 set yr [ymin:ymax]
25 #
26 set encoding iso_8859_1
27 set format x '$%g$'
28 set format y '$%.1f$'
29 set xtics 90
30 set xlabel '$x$ / °'
31 set ylabel '$y$'
32 set arrow from -120,0.8 to -60,0.8 lt 1 lw 2 nohead
33 set arrow from -120,0.7 to -60,0.7 lt 2 lw 2 nohead
34 set arrow from -120,0.6 to -60,0.6 lt 3 lw 2 nohead
35 set arrow from -120,0.5 to -60,0.5 lt 4 lw 2 nohead
36 set arrow from -120,0.4 to -60,0.4 lt 5 lw 2 nohead
37 set arrow from -120,0.3 to -60,0.3 lt 6 lw 2 nohead
38 set arrow from -120,0.2 to -60,0.2 lt 7 lw 2 nohead
39 set arrow from -120,0.1 to -60,0.1 lt 8 lw 2 nohead
40 set label '$\displaystyle\tan\alpha = \frac{\sin\alpha}{\cos\alpha}$' \
41   at 90,0 centre textcolor lt 3
42 set label '$\displaystyle\int x\mathrm{d}x = \frac12 x^2 + C_1$' \
43   at 90,-0.5 centre textcolor lt 4
44 plot sin(pi/180.*x) title '$y = \sin x$' w l lt 1 lw 4
45 set output
46 #
47 set terminal epslatex standalone oldstyle linewidth 2 rounded \
48   dashlen 1 color '' 12
49 set output 'epslatex-oldstyle.tex'
50 set tics scale 2
51 replot
52 set output
53 #
54 print "\n Now, either run"
55 print "   latex epslatex"
56 print "   dvips epslatex"
57 print " and have a look at epslatex.ps; or run"
58 print "   epstopdf epslatex-inc.eps"
59 print "   pdflatex epslatex"
60 print " and have a look at epslatex.pdf."
61 print " Do the same with epslatex-oldstyle.tex."
62 #
63 set terminal pop
64 reset