# illustrates how an external program produces data and how to plot them
example1:
	make program
	make run
	gnuplot -persist<example1.gp 
# illustrates plotting a surface bounded by other surfaces
example2:
	gnuplot -persist<example2.gp
# illustrates plotting level curves and put output in ps format
example3:
	gnuplot -persist<example3.gp
	gv curve.ps
# illustrates to plot a simple graph in LateX format
example4:
	gnuplot<example4.gp
	echo '\documentstyle[]{article} \begin{document}'>test.tex
	cat calog.tex>>test.tex
	echo '\end{document}'>>test.tex
	latex test.tex
	xdvi test.dvi
clean:
	touch t.dat t.dvi t.tex randdata t.log t.aux t.ps
	rm *.dat
	rm *.dvi
	rm *.tex
	rm ./randdata
	rm *.log
	rm *.aux
	rm *.ps
program:
	cc -lm -o randdata randdata.c
run:
	./randdata
	

