
% Note: one of the figures is quite large, so use lualatex instead of pdflatex

\documentclass[%
reprint,
superscriptaddress,
 amsmath,amssymb,
 aps, pre,
longbibliography
]{revtex4-2}

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{hyperref}% add hypertext capabilities
% This is only used for the draft, will delete later
\usepackage{xcolor}

\usepackage{amsmath,amsthm, amssymb, latexsym, lipsum}

\usepackage{tikz}   % for LaTeX-drawn pictures.
\usetikzlibrary{decorations.pathreplacing,decorations.markings,positioning,shapes.misc}
% \usetikzlibrary{arrows}  % for fancier arrows in tikz -- arrows is now deprecated
\usepackage{pgfplots}
\pgfplotsset{compat=1.17} % to ensure pgf stability against future versions

% Using pgfrealjobname to extract pdf versions of figures:
% see https://tikz.dev/base-external for more details
% Note that this doesn't (I think) work within Overleaf
% 1. \usepackage{tikz} and \usepackage{pgfplots} in the preamble
% 2. \pgfrealjobname should match the actual filename of this file
\pgfrealjobname{figures}
% 3. \pgfrealjobname interferes with Overleaf, so this line above needs to be commented out in Overleaf
%     As a result, the process only works on local computers (I think).
% 4. Then set up each figure within \beginpgfgraphicnamed{figure_1} and \endpgfgraphicnamed
%     Be careful to avoid extra spaces between LaTeX commands
%     Be careful about bounding boxes -- anything outside these will be clipped
%     You can use \amrfbox with figures to check bounding boxes
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{0.1pt}
%\newcommand{\amrfbox}{\fbox} % uncomment one of these for a 
\newcommand{\amrfbox}{}    % quick way to turn the frames on and off
% 5. Then compile this LaTeX file once for each figure with the command
% pdflatex --jobname=LV_ODE_alpha_1p00_resonance_and_phase_portrait figures
% where --jobname= matches each figure in turn and paper is the name of this file
% 6. Then running
%     pdflatex new_main_tikz_figures 
%    should ignore all the commands that generated the figure
%    and instead automatically replace these with a single
%    \includegraphics{figure_1}
%    Note that the width doesn't need to be set as it should come out the same
% 7. If the journal doesn't have pgf available, you can add the line:
% \long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\includegraphics{#1}}
% to the preamble and these will cut out all the commands that generate the picture and 
% only do the includegraphics.

% for arXiv / final submission (also comment out the \usepackage{tikz} etc and \input{tikz_definitions.tikz}):
% \long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\includegraphics{#1}}

% uncomment / delete one of these to remove \input command -- these confuse arXiv
\newcommand{\amrinput}[1]{\input{#1}}
% \newcommand{\amrinput}[1]{}

\input{tikz_definitions.tikz}

% ------------------------------------------

\begin{document}

\title{Dataset for ``Parametric resonance, chaos and spatial structure\\ in the Lotka--Volterra model''}% Force line breaks with \\

\author{Mohamed Swailem}
 \affiliation{mohamed.swailem@stonybrook.edu}%
\author{Alastair M. Rucklidge}%
 \affiliation{A.M.Rucklidge@leeds.ac.uk}%

\date{\today}% It is always \today, today,
             %  but any date may be explicitly specified

\maketitle

\begin{figure}[h!]
\hbox to \hsize{\hfil%
\amrfbox{\beginpgfgraphicnamed{LV_ODE_alpha_1p00_resonance_and_phase_portrait}%
\input{LV_ODE_alpha_1p00_resonance_and_phase_portrait.tikz}%
\endpgfgraphicnamed}\hfil}
\hbox to \hsize{\hfil%
\amrfbox{\beginpgfgraphicnamed{LV_ODE_alpha_0p00_resonance_and_phase_portrait}%
\input{LV_ODE_alpha_0p00_resonance_and_phase_portrait.tikz}%         
\endpgfgraphicnamed}\hfil}    
\caption{~}
\end{figure}

% Figure 2 is large, but lualatex instead of pdflatex works

\begin{figure}[h]
\hbox to \hsize{\hfil%
\amrfbox{\beginpgfgraphicnamed{LV_ODE_alpha_bifurcation_diagram}%
\input{LV_ODE_alpha_bifurcation_diagram.tikz}%                  
\endpgfgraphicnamed}\hfil}
\caption{~}
\end{figure}


\begin{figure*}[h!]
\hbox to \hsize{\hfil%
\amrfbox{\beginpgfgraphicnamed{LV_ODE_alpha_0p00_stability}%
\input{LV_ODE_alpha_0p00_stability.tikz}%
\endpgfgraphicnamed}\hfil}
\caption{~}
\end{figure*}

\begin{figure*}[h!]
\hbox to \hsize{\hfil\hbox to 0.48\hsize{(a)\hfil}\hfil\hbox to 0.48\hsize{(b)\hfil}\hfil}

\vspace{-2.0ex}

\hbox to \hsize{\hfil%
\includegraphics[width = 0.48\hsize]{LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_penultimate_a.pdf}\hfil%
\includegraphics[width = 0.48\hsize]{LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a.pdf}\hfil}

\hbox to \hsize{\hfil\hbox to 0.48\hsize{(c)\hfil}\hfil\hbox to 0.48\hsize{(d)\hfil}\hfil}

\vspace{-2.0ex}

\hbox to \hsize{\hfil%
\includegraphics[width = 0.48\hsize]{LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_penultimate_a.pdf}\hfil%
\includegraphics[width = 0.48\hsize]{LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a.pdf}\hfil}

\caption{A VisualPDE simulation of the PDEs is available on \url{https://visualpde.com/sim/?mini=R-I3TqRD}.}
\end{figure*}



% this requires running pdflatex once, then
% gnuplot figures_contourtmp0.script
% the pdflatex again

\begin{figure}[h!]                                   
\hbox to \hsize{\hfil%
\amrfbox{\beginpgfgraphicnamed{LV_PDE_alpha_0p0000_resonance_and_spatial_structure}%            
\input{LV_PDE_alpha_0p0000_resonance_and_spatial_structure.tikz}%
\endpgfgraphicnamed}\hfil}   
\caption{~}
\end{figure}

\end{document}
