% This file is embedded in datatool-user.pdf version 3.4.5 2026-08-23
% Example 179 Side Axes
% Label: "ex:plotxysideaxes"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{filecontents}[noheader,overwrite]{xydata.csv}
X,Y
-3.5,-2.75
-3,3
-2.5,-1
-1,1.5
1,-4.2
2.6,1.8
3.2,-0.4
\end{filecontents}

\usepackage{dataplot}
\DTLsetup{store-datum}
\DTLread[
 name=xydata,
 format=csv,
 csv-content=no-parse
 , data-types=decimal
]{xydata.csv} 

\renewcommand{\DTLplotdisplayticklabel}[1]{\ensuremath{#1}}

\begin{document}
\DTLplot{xydata}{
 x=X, y={Y},
 tick-gap=1, round=0,
 tick-label-style={font=\small},
 tick-label-offset=0pt,
 minor-ticks, side-axes,
 style=lines, width=3in, height=3in
} 
\end{document}
