Debian Codegraph @

texmf-dist/doc/latex/datatool/datatool-user-examples/datatool-user-example159.tex

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 159 Scatter Plot (Two Databases with Name Map)
3 % Label: "ex:growthscatter2namemap"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \begin{filecontents}[noheader,overwrite]{growth1.csv}
9 Time,Experiment 1,Experiment 2
10 0,3.13,3.4
11 15,3.42,3.45
12 30,3.67,3.5
13 45,4.2,3.64
14 60,4.9,3.8
15 \end{filecontents}
16
17 \begin{filecontents}[noheader,overwrite]{growth2.csv}
18 Time,Experiment 1,Experiment 2
19 0,3.14,3.2
20 15,3.51,3.53
21 30,3.79,3.61
22 45,4.5,4.25
23 60,5.1,4.9
24 \end{filecontents}
25
26 \usepackage{dataplot}
27 \usepackage{siunitx}
28 \DTLsetup{store-datum}
29 \DTLread[name=growth1,
30 csv-content=no-parse,
31 data-types=decimal
32 ]{growth1.csv}
33 \DTLread[name=growth2,
34 csv-content=no-parse,
35 data-types=decimal
36 ]{growth2.csv}
37
38
39 \DTLplotlegendsetname{growth1}{\qty{6}{\degreeCelsius}}
40 \DTLplotlegendsetname{growth2}{\qty{8}{\degreeCelsius}}
41 \begin{document}
42 \DTLplot{growth1,growth2}{
43 x=Time,
44 y={Experiment 1,Experiment 2},
45 x-label={Time ($t$)},y-label=Log Count,
46 legend,
47 width=2.5in,height=2.5in
48 }
49 \end{document}