[Tex/LaTex] Subfloat-caption position

captionssubfloats

I am trying to create sub-captions above my side-by-side figures. I want sub-caption to be above the figures and main caption to stay below the figures.

Here is my code:

    \documentclass{article}
    \usepackage{graphicx}
    \usepackage{subfig}
    \usepackage{floatrow}    
    \begin{figure}[htb]
        \subfloat[Caption for sub-figure1]{\includegraphics[clip, trim=0.5cm 0.5cm 1cm 0cm,width=3.5in]{fig1.pdf}}\hspace{-1cm}
        \qquad
        \subfloat[Caption for sub-figure2]{\includegraphics[clip, trim=0.5cm 0.5cm 1cm 0cm, width=3.5in]{fig2.pdf}}\\[-2ex]
        \label{Figure1}
        %\vspace{-2\baselineskip}
        \caption{\scriptsize{Main caption for subfigures 1 and 2. xxxxxx I want to add some notes here.}}
        \end{figure}
\end{document}

And, with the code above,my figures look like
enter image description here

How should I modify the code to put only the sub-caption above figures?

Thanks.

Best Answer

Load subfig package with position=top option.

\documentclass{article}
    \usepackage{graphicx}
    \usepackage[position=top]{subfig}
    \usepackage{floatrow}    
    \begin{document}
    \begin{figure}[htb]
        \subfloat[Caption for sub-figure1]{\includegraphics[width=.35\linewidth]{example-image-a}}\hspace{-1cm}
        \qquad
        \subfloat[Caption for sub-figure2]{\includegraphics[width=.35\linewidth]{example-image-b}}\\[-2ex]
        \label{Figure1}
        %\vspace{-2\baselineskip}
        \caption{\scriptsize{Main caption for subfigures 1 and 2. xxxxxx I want to add some notes here.}}
        \end{figure}
\end{document}

enter image description here