| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 153 Scatter Plot (Two Databases, Two Sets of Data) |
| 3 |
% Label: "ex:growthscatter4col2db" |
| 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 |
\begin{scontents}[write-out={growth2.tsv},overwrite] |
| 20 |
Experiment 1 Experiment 2 Experiment 3 |
| 21 |
Time Log Count Time Log Count Time Log Count |
| 22 |
0 3.21 0 3.39 0 3.28 |
| 23 |
15 3.43 10 3.51 10 3.45 |
| 24 |
30 3.68 25 3.65 20 3.57 |
| 25 |
45 4.4 40 3.84 30 3.64 |
| 26 |
60 4.8 55 3.92 40 3.95 |
| 27 |
\end{scontents} |
| 28 |
|
| 29 |
\usepackage{dataplot} |
| 30 |
\DTLsetup{store-datum} |
| 31 |
\DTLread[ |
| 32 |
name=growthdata, format=tsv,csv-skip-lines=1, |
| 33 |
keys={Exp1Time,Exp1Count,Exp2Time,Exp2Count}, |
| 34 |
csv-content=no-parse, |
| 35 |
data-types=decimal |
| 36 |
]{growth}% growth.tsv |
| 37 |
|
| 38 |
\DTLread[ |
| 39 |
name=growthdata2, format=tsv,csv-skip-lines=1, |
| 40 |
keys={Exp1Time,Exp1Count,Exp2Time,Exp2Count,Exp3Time,Exp3Count}, |
| 41 |
csv-content=no-parse, |
| 42 |
data-types=decimal |
| 43 |
]{growth2}% growth2.tsv |
| 44 |
|
| 45 |
\begin{document} |
| 46 |
\DTLplot{growthdata,growthdata2}{ |
| 47 |
x={Exp1Time,Exp2Time}, |
| 48 |
y={Exp1Count,Exp2Count}, |
| 49 |
x-label={Time ($t$)},y-label={Log Count}, |
| 50 |
legend, |
| 51 |
width=2.5in,height=2.5in |
| 52 |
} |
| 53 |
\end{document} |