2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added gnuplot csv example

This commit is contained in:
Martin Thoma 2012-10-28 20:35:56 +01:00
parent 05a9ee1f1b
commit e3a4193f41
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,32 @@
SOURCE = draw-csv
DELAY = 80
DENSITY = 300
WIDTH = 500
make:
gnuplot plot.gnuplot
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux plot-tmp.tex
gif:
pdfcrop $(SOURCE).pdf
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
make clean
png:
make
make svg
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
transparentGif:
convert $(SOURCE).pdf -transparent white result.gif
make clean
svg:
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

View file

@ -0,0 +1,8 @@
time,frequency
1,100
2,80
3,10
12,120
4,50
5,50
6,50
1 time frequency
2 1 100
3 2 80
4 3 10
5 12 120
6 4 50
7 5 50
8 6 50

View file

@ -0,0 +1,7 @@
\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
\input plot-tmp
\end{document}

View file

@ -0,0 +1,4 @@
set terminal latex
set output "plot-tmp.tex"
set datafile separator ","
plot 'data.csv' every::1::7 using 1:2 with lines