First, we set up a gnuplot called test.plt:
plot [-5:5] [-1.5:1.5] sin(x+pi) title "$\\sin(x+\\pi)$"
Then we also set up a small Makefile:
.SUFFIXES: .plt .tex .pdf %.tex: %.plt gnuplot -e " \ set format '$%g$' ; \ set terminal epslatex standalone color ; \ set output '$@' \ " $< %.pdf: %.tex pdflatex $< all: test.pdfRunning "make all" will produce this plot:
No comments:
Post a Comment