效果:
代码:
\begin{tikzpicture}[font=\scriptsize]
\begin{axis}[
legend pos=south east,
y=4cm, x=1.5cm,
% xlabel={label},
ylabel={local representation},
xmin=-0.2, xmax=4,
ymin=-0.1, ymax=1.2,
% real
xtick={1,2,3}, ytick={0.5,1},
xticklabels={label1,label2,label3}, yticklabels={0.5,1.0},
line width=1pt,
axis lines=center,
]
\addplot+[draw=none,mark=none,fill=red!30] coordinates {
(0.7,0)
(0.7,0.7)
(1.3,0.7)
(1.3,0)
};
\end{axis}
\end{tikzpicture}%