我想要一个图中有两个热图,并且颜色条应该位于两张图片下方。不幸的是,使用此colorbar horizontal
选项时,其中一个颜色条没有最高值的颜色。我该如何解决这个问题?
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usepgfplotslibrary{colorbrewer}
\begin{figure}[tb]
\centering
\begin{tikzpicture}
\begin{axis}[width=0.45\linewidth,enlargelimits=false,colorbar,colormap/Blues,ticklabel style = {font=\small},at={(0,0)},colorbar horizontal]
\addplot [matrix plot,point meta=explicit]
coordinates {
(0,0) [12.1337814] (1,0) [20.20624204] (2,0) [0.72550741] (3,0) [4.50361657] (4,0) [5.94018956]
(0,1) [3.93110895] (1,1) [18.97859117] (2,1) [14.01737163] (3,1) [2.21380307] (4,1) [4.99754559]
%... and so on
};
\end{axis}
\node[] at (-.6,4) {(a)};
\begin{axis}[width=0.45\linewidth,enlargelimits=false,colorbar,colormap/Blues,ticklabel style = {font=\small},at={(0.45\linewidth,0)},colorbar horizontal]
\addplot [matrix plot,point meta=explicit]
coordinates {
(0,0) [1.17318609] (1,0) [1.05299383] (2,0) [1.16487899] (3,0) [1.29665568] (4,0) [1.0800012] (5,0) [1.4084673] (6,0) [1.44914629] (7,0) [1.04543044] (8,0) [0.94458378] (9,0) [0.94537562]
(0,1) [1.00856655] (1,1) [1.04160759] (2,1) [1.03695704] (3,1) [1.07905316] (4,1) [1.12535244] (5,1) [1.12676269] (6,1) [1.03765699] (7,1) [1.00644902] (8,1) [0.90470504] (9,1) [1.06445035]
%... and so on
};
\end{axis}
\node[] at (6,4) {(b)};
\end{tikzpicture}
\caption[Heat Map]{Caption...}
\label{fig:heatmap}
\end{figure}
这里有两张图片展示了我的意思。右边的颜色条正在变化。请忽略第一张图片中的重叠 -> 这就是我想要水平颜色条的原因
没有colorbar horizontal
和colorbar horizontal