Stack Exchange
How to adjust the flower brackets for a bar chart?
Code:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{patterns}
\begin{document}

\begin{figure}[ht]
    \begin{tikzpicture}
        \begin{axis}[
            ybar,
            ymin=0,
            ymax=5,
            width=\linewidth,
            height=3.4cm,
            bar width=6pt,
            ylabel style={align=center, font=\footnotesize},
            ylabel={Training time\\growth rate ($N\times$)},
            nodes near coords,
            nodes near coords style={font=\tiny}, % Smaller font size
            xticklabel style={rotate=90},
            xtick=data,
            table/header=false,
            table/row sep=\\,
            legend style={at={(0.3,1.20)}, anchor=west, legend columns=4},
            label style={font=\footnotesize},
            legend image code/.code={%
                \draw[#1] (0cm,-0.1cm) rectangle (0.6cm,0.2cm);
            },
            legend image post style={scale=2},
            xticklabels from table={\scriptsize
                3-6~(PP)\\6-12~(PP)\\12-24~(PP)\\
                3-6~(CN)\\6-12~(CN)\\12-24~(CN)\\
                3-6~(PP)\\6-12~(PP)\\12-24~(PP)\\
                3-6~(CN)\\6-12~(CN)\\12-24~(CN)\\
            }{[index]0},
            enlarge y limits={value=0.5, upper},
            axis on top, % Puts the axes on top of the pattern
        ]
        \addplot [fill=gray!80, draw=black, pattern=north west lines] table[x expr=\coordindex,y index=0]{
            3.5\\3.7\\0\\3.4\\3.6\\0\\
            3.8\\4.2\\0\\4.1\\4.3\\0\\
            2.6\\3.2\\0\\2.5\\3.1\\0\\
        };
        \pgfplotsinvokeforeach{0,3,4,7,8,11}{\coordinate(l#1)at(axis cs:#1,0);}
        \end{axis}
        \coordinate(bbs) at (current bounding box.south);
        \foreach[count=\i, evaluate={\s=int(4*\i-1)}, evaluate={\e=int(4*(\i-1))}] \text in { phase1,phase2,phase3}
            \draw[decorate,decoration=brace]([xshift=4pt]l\s|-bbs)--node[below=5pt]{\text}([xshift=-4pt]l\e|-bbs);
    \end{tikzpicture}
    \label{Figure4-growthrate}
\end{figure}

\end{document}

Output:

In the above picture, I'm trying to cover the first six bars to phase 1, the next 6 bars to phase 2, and the last 6 bars to phase 3. But somehow, I'm not able to tweak the dimensions of the flower brackets. Can someone help me tweak the dimensions of the flower brackets in the Latex code?

The curly braces are made by first defining named coordinates along the x-axis, and later drawing the braces relative to those. The coordinates are made by this line:
\pgfplotsinvokeforeach{0,3,4,7,8,11}{\coordinate(l#1)at(axis cs:#1,0);}

For each of the values in the comma-separated list in the first set of {}, the code in the second set of {} is executed, replacing the #1 with the value from list (0,3, etc). You need coordinates at x-values 0 and 5 (to draw the brace between the first six bars), 6 and 11 (second group), and 12 and 17 (third group), so either modify the list accordingly, or use 0,...,17, which will give you coordinates at all x-values from 0 to 17.
The bars are drawn with a loop where the number for the start and end coordinates used as reference are calculated like this:
evaluate={\s=int(4*\i-1)}, evaluate={\e=int(4*(\i-1))}

Your original code was created for groups of four bars. To modify it for groups of six bars, change 4 in the to evaluate expressions to 6.
Complete code below. Note I also added xticklabel style={font=\scriptsize} to set the font size for all the ticks, instead of having it in the list of labels, where it only affected the first tick.

\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{patterns}
\begin{document}

\begin{figure}[ht]
    \begin{tikzpicture}
        \begin{axis}[
            ybar,
            ymin=0,
            ymax=5,
            width=\linewidth,
            height=3.4cm,
            bar width=6pt,
            ylabel style={align=center, font=\footnotesize},
            ylabel={Training time\\growth rate ($N\times$)},
            nodes near coords,
            nodes near coords style={font=\tiny}, % Smaller font size
            xticklabel style={rotate=90},
            xtick=data,
            table/header=false,
            table/row sep=\\,
            legend style={at={(0.3,1.20)}, anchor=west, legend columns=4},
            label style={font=\footnotesize},
            legend image code/.code={%
                \draw[#1] (0cm,-0.1cm) rectangle (0.6cm,0.2cm);
            },
            legend image post style={scale=2},
            xticklabels from table={
                3-6~(PP)\\6-12~(PP)\\12-24~(PP)\\
                3-6~(CN)\\6-12~(CN)\\12-24~(CN)\\
                3-6~(PP)\\6-12~(PP)\\12-24~(PP)\\
                3-6~(CN)\\6-12~(CN)\\12-24~(CN)\\
            }{[index]0},
            xticklabel style={font=\scriptsize},
            enlarge y limits={value=0.5, upper},
            axis on top, % Puts the axes on top of the pattern
        ]
        \addplot [fill=gray!80, draw=black, pattern=north west lines] table[x expr=\coordindex,y index=0]{
            3.5\\3.7\\0\\3.4\\3.6\\0\\
            3.8\\4.2\\0\\4.1\\4.3\\0\\
            2.6\\3.2\\0\\2.5\\3.1\\0\\
        };
        \pgfplotsinvokeforeach{0,...,17}{\coordinate(l#1)at(axis cs:#1,0);}
        \end{axis}
        \coordinate(bbs) at (current bounding box.south);
        \foreach[count=\i, evaluate={\s=int(6*\i-1)}, evaluate={\e=int(6*(\i-1))}] \text in { phase1,phase2,phase3}
            \draw[decorate,decoration=brace]([xshift=4pt]l\s|-bbs)--node[below=5pt]{\text}([xshift=-4pt]l\e|-bbs);
    \end{tikzpicture}
    \label{Figure4-growthrate}
\end{figure}

\end{document}

