File: epslatex.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (62 lines) | stat: -rw-r--r-- 1,948 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
print "\n This file demonstrates how to use the epslatex terminal."
print " It will generate two files: epslatex-inc.eps and epslatex.tex."
print " \nIf the file gnuplot.cfg is found by LaTeX it will be loaded"
print " and can be used for further settings, e.g., here it provides"
print " the package exscale.sty which enlargens the integral sign.\n"
pause -1 "Hit return to continue"
#
xmin=-270.
xmax=270.
ymin=-1.1
ymax=1.2
#
reset
set terminal push
set terminal epslatex standalone linewidth 2 rounded \
  dashlen 4 color '' 12
set output 'epslatex.tex'
unset autoscale
set xr [xmin:xmax]
set yr [ymin:ymax]
#
save_encoding = GPVAL_ENCODING
set encoding iso_8859_1
set format x '$%g$'
set format y '$%.1f$'
set xtics 90
set xlabel '$x$ / '
set ylabel '$y$'
set arrow from -120,0.8 to -60,0.8 lt 1 lw 2 nohead
set arrow from -120,0.7 to -60,0.7 lt 2 lw 2 nohead
set arrow from -120,0.6 to -60,0.6 lt 3 lw 2 nohead
set arrow from -120,0.5 to -60,0.5 lt 4 lw 2 nohead
set arrow from -120,0.4 to -60,0.4 lt 5 lw 2 nohead
set arrow from -120,0.3 to -60,0.3 lt 6 lw 2 nohead
set arrow from -120,0.2 to -60,0.2 lt 7 lw 2 nohead
set arrow from -120,0.1 to -60,0.1 lt 8 lw 2 nohead
set label '$\displaystyle\tan\alpha = \frac{\sin\alpha}{\cos\alpha}$' \
  at 90,0 centre textcolor lt 3
set label '$\displaystyle\int x\mathrm{d}x = \frac12 x^2 + C_1$' \
  at 90,-0.5 centre textcolor lt 4
plot sin(pi/180.*x) title '$y = \sin x$' w l lt 1 lw 4
set output
#
set terminal epslatex standalone oldstyle linewidth 2 rounded \
  dashlen 1 color '' 12
set output 'epslatex-oldstyle.tex'
set tics scale 2
replot
set output
#
print "\n Now, either run"
print "   latex epslatex"
print "   dvips epslatex"
print " and have a look at epslatex.ps; or run"
print "   epstopdf epslatex-inc.eps"
print "   pdflatex epslatex"
print " and have a look at epslatex.pdf."
print " Do the same with epslatex-oldstyle.tex."
#
set terminal pop
set encoding save_encoding
reset