\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{ifthen}
\usepackage{color}
\usepackage{fancybox}
\usepackage{subfig}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.18}
\usepgfplotslibrary{statistics}
\geometry{left=2cm,right=2cm,top=2cm,bottom=2cm}

%%% MARCO definition start
\newcommand{\mohn}{\mathcal{H}_{\textsc{Mo}}}

\newcommand{\thplot}[5]{
\addplot+ [
boxplot prepared={
lower whisker=#1, 
lower quartile=#2,
median=#3,
upper quartile=#4, 
upper whisker=#5,
box extend=0.3,
},
] coordinates {}
;
}

\newcommand{\thboxplot}[5]{
{\scriptsize
\begin{tikzpicture}
\begin{axis}[
height=#1,
width=#2,
colormap name=viridis,
cycle list={[indices of colormap={0,2,4,6,8,10,12,14,16,18} of viridis]},
%cycle list={[of colormap]},
%cycle list name=color list,
boxplot/draw direction=y,
scaled ticks=false,
xticklabel style={rotate=-90,anchor=west,/pgf/number format/precision=3,/pgf/number format/fixed, /pgf/number format/fixed zerofill,
},
ymax=1.0,
ymin=0.4,
ylabel=Best F2 scores,
xtick={#3},
xticklabels={#4}]
#5
\end{axis}
\end{tikzpicture}
}
}

\newcommand{\timebars}[1]{\addplot coordinates {#1};}
\newcommand{\timebarplot}[4]
{
{\scriptsize
\begin{tikzpicture}
    \begin{axis}[
        height=#1,
        width=#2,
        yticklabel style={rotate=-45},
        xticklabel style={
            rotate=-90,
            /pgf/number format/1000 sep=},
        ylabel={Running time [ms]},
        ylabel shift=-2pt,
        enlargelimits=0.05,
        ybar=0,
        bar width=1pt,
        scaled ticks=false,
        symbolic x coords={#3},
        xtick=data,
    ]
#4
\end{axis}
\end{tikzpicture}
}
}
%%% MARCO definition end


\title{A Template File For Drawing The Plots}
\date{}

\begin{document}

\maketitle

\section{Introduction}
This document is a template file that contains necessary macro definitions for drawing the plots and tables (Figures 2--4 and Tables 3 and 4) in the paper. \textbf{It is highly recommended to compile this file using Overleaf, based on which the document is tested.}

\section{Box Plots}
If you want to draw the box plots in the paper, you must use the executable, namely \verb|evaluation.jar|, as follows to generate the box plot data:
\begin{verbatim}
java -jar evaluation.jar -function=boxplot -result=<path-to-result> -output=<output-file>
\end{verbatim}
where \verb|<path-to-result>| points to the folder containing the results of threshold estimation, and \verb|<output-file>| refers to the location where the output is to be written.
Afterwards, you will find the box plot code in the output file.
Please copy the content between \verb|Boxplot data starts here| and \verb|Boxplot data ends here| to \verb|blank-1| in Figure \ref{fig:boxploat} and you will see the plots after compilation.
\textbf{Note that you may have to adjust the plot sizes and add line breaks to make the plots look better.}

\begin{figure}[h]
    \centering
    %% blank-1 starts
    \verb|copy the box plot code here|
    %% blank-1 ends
    \caption{Box Plots}
    \label{fig:boxploat}
\end{figure}

\section{Threshold Tables}
The output file that is produced in the previous section also contains the latex code to draw the threshold tables.
We may copy the tables between \verb|Threshold data starts here| and \verb|Threshold data ends here| to \verb|blank-2| below.
\textbf{Note that you may have to add line breaks between tables to make them look better.}

    %% blank-2 starts
    \verb|copy the table code here|
    %% blank-2 ends

\section{Bar Plots}
If you want to draw the bar plots in the paper, you must use the executable, namely \verb|evaluation.jar|, as follows to generate the box plot data:
\begin{verbatim}
java -jar evaluation.jar -function=barplot -result=<path-to-result> -output=<output-file>
\end{verbatim}
where \verb|<path-to-result>| points to the folder containing the comparison results of model matchers, and \verb|<output-file>| refers to the location where the output is to be written.
Afterwards, you will find the bar plot code in the output file.
Please copy the content between \verb|Barplot data starts here| and \verb|Barplot data ends here| to \verb|blank-3| in Figure \ref{fig:barploat} and you will see the plots after compilation.
\textbf{Note that you may have to adjust the plot sizes to make the plots look better and for each dataset, you must repeat this procedure to obtain one bar plot.}

\begin{figure}[h]
    \centering
    %% blank-3 starts
    \verb|copy the bar plot code here|
    %% blank-3 ends
    \caption{Bar Plot}
    \label{fig:barploat}
\end{figure}

\end{document}
