I am plotting a series of graphs using a macro I've made (`\mygraph`, as given below). For some graphs I want all the data to be plotted with a bit of whitespace around it, which I get by using `enlarge x limits={abs=5mm}`. This is achieved in the below code for Figure 1. For other graphs (e.g. Figure 2) I want to just plot the data over a certain range, which I can achieve by specifying the `xmin` and `xmax` values, and by using `enlarge x limits=false`. How can go about implementing a conditional `enlarge x limits` in my macro such that it's set to false if either `xmin` or `xmax` are specified?

```
\documentclass{book}
\usepackage{pgfplots}
\usepackage{tikz}

\pgfplotsset{1Dgraph/.style={
    enlarge x limits={abs=5mm},
    % other settings that aren't relevant
}}

\newcommand{\mygraph}[4]{
    \begin{tikzpicture}
    \begin{axis}[1Dgraph,xmin=#3,xmax=#4,]
    \addplot[no markers, black] table[x index=0,y index=1] {#2};
    \addplot[no markers, red] table[x index=2,y index=3] {#2};
    \draw[dashed, gray] ({axis cs:#1,0}|-{rel axis cs:0,0}) -- ({axis cs:#1,0}|-{rel axis cs:0,1});
    \end{axis}      
    \end{tikzpicture}
}

\begin{document}

\begin{figure}
    \mygraph{6}{data.txt}{}{}
    \caption{text}
\end{figure}

\begin{figure}
    \mygraph{6}{data.txt}{3}{10}
    \caption{text}
\end{figure}

\end{document}

```