| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 152 Scatter Plot (One Database, Two Sets of Data) |
| 3 |
% Label: "ex:growthscatter4col" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{scontents}% to write test file with TABs preserved |
| 9 |
\begin{scontents}[write-out={growth.tsv},overwrite] |
| 10 |
Experiment 1 Experiment 2 |
| 11 |
Time Log Count Time Log Count |
| 12 |
0 2.9 0 3.31 |
| 13 |
15 3.14 10 3.45 |
| 14 |
30 3.26 25 3.61 |
| 15 |
45 4.01 40 3.76 |
| 16 |
60 4.2 55 3.89 |
| 17 |
\end{scontents} |
| 18 |
|
| 19 |
\usepackage{dataplot} |
| 20 |
\DTLsetup{store-datum,default-name=growthdata} |
| 21 |
\DTLread[ |
| 22 |
format=tsv,csv-skip-lines=1, |
| 23 |
keys={Exp1Time,Exp1Count,Exp2Time,Exp2Count}, |
| 24 |
csv-content=no-parse, |
| 25 |
data-types=decimal |
| 26 |
]{growth} |
| 27 |
\begin{document} |
| 28 |
\DTLplot{growthdata}{ |
| 29 |
x={Exp1Time,Exp2Time}, |
| 30 |
y={Exp1Count,Exp2Count}, |
| 31 |
x-label={Time ($t$)}, y-label={Log Count}, |
| 32 |
legend, |
| 33 |
width=2.5in, height=2.5in |
| 34 |
} |
| 35 |
\end{document} |