EDIT: Please have a look at Torbjørn's solution, I believe it is easier and cleaner than mine.
If you want to center the caption to the complete minipage/tikzpicture: Thats easy. Just add justification=centering
to your \captionformat
.
\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{caption}
\begin{document}
\begin{figure}
\begin{minipage}[b]{0.5\textwidth}
\centering
\begin{tikzpicture}
\node (image) at (0,0) {\includegraphics[width=0.8\textwidth]{example-image}};
\node (ylabel) at (-3.25,0) {$\frac{test}{test}$};
\end{tikzpicture}
\captionsetup{type=figure,font=footnotesize,justification=centering,format=plain}
\captionof{figure}{This is some junk text as caption for figure 1}
% Just for demo, you can remove these two lines
\noindent\rule{1pt}{6pt}
\noindent\rule{\textwidth}{1pt}
\end{minipage}
\begin{minipage}[b]{0.5\textwidth}
\centering
\begin{tikzpicture}
\node (image) at (0,0) {\includegraphics[width=0.8\textwidth]{example-image}};
\node (ylabel) at (-3.25,0) {$\frac{test}{test}$};
\end{tikzpicture}
\captionsetup{type=figure,font=footnotesize,justification=centering,format=plain}
\captionof{figure}{This is some junk text as caption for figure 2}
% Just for demo, you can remove these two lines
\noindent\rule{1pt}{6pt}
\noindent\rule{\textwidth}{1pt}
\end{minipage}
\end{figure}
\end{document}

The additional lines show that the captions are centered within the minipage.
If you want to center the caption to the "real" image - the grey boxes in my example - then you have to tell the caption where your image starts and ends. This can be accomplished with the margin={<left>,<right>}
parameter for \captionsetup. I've done this here for my gray boxes with margin={1cm,0.4cm}
, but it might be necessary to adjust those values for your image.
\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{caption}
\begin{document}
\begin{figure}
\begin{minipage}[b]{0.5\textwidth}
\centering
\begin{tikzpicture}
\node (image) at (0,0) {\includegraphics[width=0.8\textwidth]{example-image}};
\node (ylabel) at (-3.25,0) {$\frac{test}{test}$};
\end{tikzpicture}
\captionsetup{type=figure,font=footnotesize,justification=centering,margin={1cm,0.4cm},format=plain}
\captionof{figure}{This is some junk text as caption for figure 1}
\noindent\rule{1pt}{6pt}
\noindent\rule{\textwidth}{1pt}
\end{minipage}
\begin{minipage}[b]{0.5\textwidth}
\centering
\begin{tikzpicture}
\node (image) at (0,0) {\includegraphics[width=0.8\textwidth]{example-image}};
\node (ylabel) at (-3.25,0) {$\frac{test}{test}$};
\end{tikzpicture}
\captionsetup{type=figure,font=footnotesize,justification=centering,margin={1cm,0.4cm},format=plain}
\captionof{figure}{This is some junk text as caption for figure 2}
\noindent\rule{1pt}{6pt}
\noindent\rule{\textwidth}{1pt}
\end{minipage}
\end{figure}
\end{document}

As you can see, the caption is now centered relative to the \included
image.
Figure 3.8: This is some junk text as caption for figure 1
centered vertically and horizontally within the left image? Is theFigure 3.8:
part also necessary?Figure 3.8: This is some junk text as caption for figure 1
should be horizontally centered to the left image. I wanted the caption of Figure 3.8 and 3.9 to be vertically aligned, that's why I use minipage and it works. Hence, there is no issue with vertical alignment. For your second question, Figure 3.8 is necessary for metrim left
but it didn't work :(