Blame demo/epslatex.dem

Packit 0986c0
#
Packit 0986c0
# $Id: epslatex.dem,v 1.2 2005/08/08 09:13:02 mikulik Exp $
Packit 0986c0
#
Packit 0986c0
# This file demonstrates new features in gnuplot 4.1
Packit 0986c0
print "\n This file demonstrates how to use the epslatex terminal."
Packit 0986c0
print " It will generate two files: epslatex-inc.eps and epslatex.tex."
Packit 0986c0
print " \nIf the file gnuplot.cfg is found by LaTeX it will be loaded"
Packit 0986c0
print " and can be used for further settings, e.g., here it provides"
Packit 0986c0
print " the package exscale.sty which enlargens the integral sign.\n"
Packit 0986c0
pause -1 "Hit return to continue"
Packit 0986c0
#
Packit 0986c0
xmin=-270.
Packit 0986c0
xmax=270.
Packit 0986c0
ymin=-1.1
Packit 0986c0
ymax=1.2
Packit 0986c0
#
Packit 0986c0
reset
Packit 0986c0
set terminal push
Packit 0986c0
set terminal epslatex standalone linewidth 2 rounded \
Packit 0986c0
  dashlen 4 color '' 12
Packit 0986c0
set output 'epslatex.tex'
Packit 0986c0
unset autoscale
Packit 0986c0
set xr [xmin:xmax]
Packit 0986c0
set yr [ymin:ymax]
Packit 0986c0
#
Packit 0986c0
save_encoding = GPVAL_ENCODING
Packit 0986c0
set encoding iso_8859_1
Packit 0986c0
set format x '$%g$'
Packit 0986c0
set format y '$%.1f$'
Packit 0986c0
set xtics 90
Packit 0986c0
set xlabel '$x$ / °'
Packit 0986c0
set ylabel '$y$'
Packit 0986c0
set arrow from -120,0.8 to -60,0.8 lt 1 lw 2 nohead
Packit 0986c0
set arrow from -120,0.7 to -60,0.7 lt 2 lw 2 nohead
Packit 0986c0
set arrow from -120,0.6 to -60,0.6 lt 3 lw 2 nohead
Packit 0986c0
set arrow from -120,0.5 to -60,0.5 lt 4 lw 2 nohead
Packit 0986c0
set arrow from -120,0.4 to -60,0.4 lt 5 lw 2 nohead
Packit 0986c0
set arrow from -120,0.3 to -60,0.3 lt 6 lw 2 nohead
Packit 0986c0
set arrow from -120,0.2 to -60,0.2 lt 7 lw 2 nohead
Packit 0986c0
set arrow from -120,0.1 to -60,0.1 lt 8 lw 2 nohead
Packit 0986c0
set label '$\displaystyle\tan\alpha = \frac{\sin\alpha}{\cos\alpha}$' \
Packit 0986c0
  at 90,0 centre textcolor lt 3
Packit 0986c0
set label '$\displaystyle\int x\mathrm{d}x = \frac12 x^2 + C_1$' \
Packit 0986c0
  at 90,-0.5 centre textcolor lt 4
Packit 0986c0
plot sin(pi/180.*x) title '$y = \sin x$' w l lt 1 lw 4
Packit 0986c0
set output
Packit 0986c0
#
Packit 0986c0
set terminal epslatex standalone oldstyle linewidth 2 rounded \
Packit 0986c0
  dashlen 1 color '' 12
Packit 0986c0
set output 'epslatex-oldstyle.tex'
Packit 0986c0
set tics scale 2
Packit 0986c0
replot
Packit 0986c0
set output
Packit 0986c0
#
Packit 0986c0
print "\n Now, either run"
Packit 0986c0
print "   latex epslatex"
Packit 0986c0
print "   dvips epslatex"
Packit 0986c0
print " and have a look at epslatex.ps; or run"
Packit 0986c0
print "   epstopdf epslatex-inc.eps"
Packit 0986c0
print "   pdflatex epslatex"
Packit 0986c0
print " and have a look at epslatex.pdf."
Packit 0986c0
print " Do the same with epslatex-oldstyle.tex."
Packit 0986c0
#
Packit 0986c0
set terminal pop
Packit 0986c0
set encoding save_encoding
Packit 0986c0
reset