
\begin{figure}[!htb]
\definecolor{blue}{RGB}{42, 179, 205}
\definecolor{green}{RGB}{250, 231, 35}
\definecolor{orange}{RGB}{253, 127, 116}
\definecolor{red}{RGB}{150, 55, 173}

\centering

\begin{tikzpicture}
\begin{groupplot}[
    group style={group size=5 by 3, horizontal sep=0.75cm, vertical sep=1.25cm},
    width=3.6cm, height=4cm,
    xlabel={},
    xtick={}
    legend style={font=\small},
    legend pos=north east,
    grid=major
    % ymin=0.7, ymax=0.85 % Adjust according to your data
]



    \nextgroupplot[
            title={\scriptsize Aniso Downsample},
            % xlabel={Severity},
            ylabel={\scriptsize HD95},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_AnisoDownsample.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_AnisoDownsample.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_AnisoDownsample.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_AnisoDownsample.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_AnisoDownsample.csv};


    \nextgroupplot[
            title={\scriptsize Bias Field},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_BiasField.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_BiasField.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_BiasField.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_BiasField.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_BiasField.csv};


    \nextgroupplot[
            title={\scriptsize Contrast Compression},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastCompression.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastCompression.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastCompression.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastCompression.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastCompression.csv};


    \nextgroupplot[
            title={\scriptsize Contrast Expansion},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastExpansion.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastExpansion.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastExpansion.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastExpansion.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ContrastExpansion.csv};


    \nextgroupplot[
            title={\scriptsize Elastic Deformation},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ElasticDeformation.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ElasticDeformation.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ElasticDeformation.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ElasticDeformation.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_ElasticDeformation.csv};


    \nextgroupplot[
            title={\scriptsize Ghosting},
            % xlabel={Severity},
            ylabel={\scriptsize ACDC \\ \scriptsize HD95},
            ylabel style={align=center},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Ghosting.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Ghosting.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Ghosting.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Ghosting.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Ghosting.csv};


    \nextgroupplot[
            title={\scriptsize Iso Downsample},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_IsoDownsample.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_IsoDownsample.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_IsoDownsample.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_IsoDownsample.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_IsoDownsample.csv};


    \nextgroupplot[
            title={\scriptsize k-Space Sub.},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_KSpaceSubsampling.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_KSpaceSubsampling.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_KSpaceSubsampling.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_KSpaceSubsampling.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_KSpaceSubsampling.csv};


    \nextgroupplot[
            title={\scriptsize Random Motion},
            % xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RandomMotion.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RandomMotion.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RandomMotion.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RandomMotion.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RandomMotion.csv};


    \nextgroupplot[
            title={\scriptsize Rician Noise},
            xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RicianNoise.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RicianNoise.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RicianNoise.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RicianNoise.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_RicianNoise.csv};


    \nextgroupplot[
            title={\scriptsize Rotation},
            xlabel={Severity},
            ylabel={\scriptsize HD95},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Rotation.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Rotation.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Rotation.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Rotation.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Rotation.csv};


    \nextgroupplot[
            title={\scriptsize Scale},
            xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Scale.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Scale.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Scale.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Scale.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Scale.csv};


    \nextgroupplot[
            title={\scriptsize Smoothing},
            xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Smoothing.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Smoothing.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Smoothing.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Smoothing.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_Smoothing.csv};


    \nextgroupplot[
            title={\scriptsize Spike Noise},
            xlabel={Severity},
            xtick={0,1,2,3,4,5},
            xticklabel style={font=\scriptsize},
            yticklabel style={font=\scriptsize},
            cycle list={{blue,mark=square*,mark size=1pt},{orange,mark=triangle*},{green,mark=diamond*},{red,mark=x},{gray,mark=*,mark size=1pt}}
        ]
        \addplot table [x=Severity, y=A, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_SpikeNoise.csv};
        \addplot table [x=Severity, y=B, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_SpikeNoise.csv};
        \addplot table [x=Severity, y=C, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_SpikeNoise.csv};
        \addplot table [x=Severity, y=D, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_SpikeNoise.csv};
        \addplot table [x=Severity, y=N, col sep=comma] {pgfplots/acdc/pgf_format_corruption_trends_hd95_SpikeNoise.csv};
\end{groupplot}
\end{tikzpicture}

\centering
\begin{tikzpicture}
    \begin{customlegend}[legend columns=-1,legend style={draw=none,column sep=1ex},legend entries={\scriptsize No Aug., \scriptsize Base, \scriptsize + MixUp, \scriptsize + AFA, \scriptsize + MixUp + AFA}]
    \addlegendimage{gray,fill=gray,mark=*}
    \addlegendimage{blue,fill=blue!30!white,mark=square*}
    \addlegendimage{green,fill=green,mark=diamond*}
    \addlegendimage{orange,fill=orange,mark=triangle*}
    \addlegendimage{red,fill=red,mark=x}
    \end{customlegend}
\end{tikzpicture}%
\caption{Trend of HD95 per severity for test sets transformed with 14 different transformations for the ACDC dataset.}
\label{fig:hd95_all_trends_per_corruption_acdc}
\end{figure}
