Tikz 子图(\includegraphics)与文本重叠

Tikz 子图(\includegraphics)与文本重叠

我创建了一个包含 2 行 3 个子图的 tikz 图形。第一行包含一个图像,而另一行包含两个彼此相邻的条形图。

我的问题:导入的图片与图形上方的文字重叠。

\documentclass{article}
\usepackage[utf8]{inputenc}
 \usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.7}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lipsum}


\title{Example}
\author{Name }
\date{April 2021}

\begin{document}

\maketitle

\section{Introduction}
\lipsum[1-5]

    \begin{figure}[h]
\centering
\resizebox{\columnwidth}{!}{%
\begin{subfigure}[b]{0.9\linewidth}
    \begin{tikzpicture}
\includegraphics[width=\linewidth,height=7cm]{example-image-a.jpg}
\end{tikzpicture}
\label{fig:sub1}
    \end{subfigure}
    }
    \resizebox{\linewidth}{!}{%
    \begin{subfigure}[b]{0.45\linewidth}

\begin{tikzpicture}
\begin{axis}[
    ybar,
    domain=0:1,
    every axis plot/.append style={no markers},
    %xlabel=Timepoints (d),
    ylabel= Label,
    width=\linewidth,
    height=7cm,
    ymax=700,
    ymin=150,
    xmin=-0.5,
    xmax=1.5,
    xticklabels={DIV15, DIV17},xtick={0,1},
    x tick label style={rotate=90}, 
    legend style={at={(0.45,0.78)},anchor=west}]
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit]
    coordinates {
    (0,490.40) +- (23.86,23.86) 
    (1,376.00) +- (22.19,22.19) 
    };
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,386.30) +- (41.29,41.29) 
    (1,329.90) +- (32.07,32.07)
    };  
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,424.60) +- (24.90,24.90) 
    (1,334.90) +- (20.09,20.09)
    };  
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,263.2) +- (33.89,33.89) 
    (1,228.00) +- (30.67,30.67)
    };  
\node [above, font=\Large] at (axis cs: 0.21,300) {$\ast$}; 
\node [above, font=\Large] at (axis cs: 1.21,265) {$\ast$}; 
\legend{1,2,3,4}
\end{axis}
\end{tikzpicture}   

    \end{subfigure}\hspace{8mm}
    
    
\begin{subfigure}[b]{0.5\linewidth}
    \begin{tikzpicture}
\begin{axis}[
    ybar,
    %bar width=.45cm,
    domain=0:1,
    every axis plot/.append style={no markers},
    ylabel= Label,
    width=\linewidth,
    height=7cm,
    ymax=7,
    ymin=0,
    xmin=-0.5,
    xmax=1.5,
    xticklabels={DIV15, DIV17},xtick={0,1},
    x tick label style={rotate=90}, 
    legend style={at={(0.45,0.78)},anchor=west}]
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit]
    coordinates {
    (0,3.69) +- (0.17,0.17) 
    (1,4.16) +- (0.28,0.28) 
    };
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,3.29) +- (0.31,0.31) 
    (1,3.36) +- (0.26,0.26)
    };  
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,3.70) +- (0.11,0.11) 
    (1,4.10) +- (0.25,0.25)
    };  
\addplot+[fill,error bars/.cd,
    y dir=both,y explicit] 
    coordinates {
    (0,2.32) +- (0.30,0.30) 
    (1,3.11) +- (0.25,0.25)
    };  
\node [above, font=\Large] at (axis cs: 0.21,2.8) {$\ast$}; 
\node [above, font=\Large] at (axis cs: 1.21,3.6) {$\ast$}; 
\end{axis}
\end{tikzpicture}   
    \end{subfigure}}
    \caption[Caption]{Caption\\
\footnotesize{\textit{Note.}}}
    \label{fig:3.5}
\end{figure}

\end{document}

谢谢你!

在此处输入图片描述

相关内容