我想隐藏黑匣子,但不隐藏x axis
和的标签y axis
。
我使用的代码是:
\begin{tikzpicture}
\begin{axis}[
ybar stacked, ymin=0,
%width=\textwidth,
height=6cm,
enlargelimits=0.05,
legend style={at={(0.5,-0.20)},
anchor=north,legend columns=-1},
symbolic x coords={F-Pa-Pr,F-Pa-S,4-Pa-Pr,5-Pa-Pr,6-Pa-Pr,7-Pa-Pr,4-Pa-S,5-Pa-S,6-Pa-S,7-Pa-S},
xtick=data,
x tick label style={rotate=45, anchor=east},
legend image code/.code={\draw[#1, draw=none] (0cm,-0.1cm) rectangle (0.6cm,0.1cm);},
legend style={area legend,
at={(0.5,-0.3)},
anchor=north,
legend columns=4,
draw=none,
/tikz/every even column/.append style={column sep=1.0cm}}]]
%\addplot table[x=Sample, y=C] {CHNSb.dat};
%\addplot table[x=Sample, y=H] {CHNSb.dat};
%\addplot table[x=Sample, y=N] {CHNSb.dat};
%\addplot table[x=Sample, y=O] {CHNSb.dat};
\legend{Carbon, Hydrogen, Nitrogen, Oxygen}
\end{axis}
\end{tikzpicture}