我想在图片1就像图片-2。我还想删除用圆圈标记的箭头。任何建议或完整的代码都将不胜感激。
图片1 代码
%-------------------------------------------
\begin{axis}
[
grid = both, %grid in the picture
height=10cm, %height of the figure
width=\textwidth,
axis x line=middle,%remove the top x axis line
legend style={draw=none}, %remove the box, options- none, white, black
%-------------------------------------------
xlabel style={xshift=-4.2cm}, %shifting the x line text -0.2
xlabel style={yshift=-1.2cm}, %shifting the x line text -0.2
ylabel style={yshift=0.3cm}, %shifting the y line text
%-------------------------------------------
ylabel=Accuradfdcy Value {\%},
xlabel=number of best terms,
]
图片-2
答案1
CW 来自评论。
要恢复带框的轴,只需删除axis x line=middle
。由于我没有您的绘图函数,因此我在此处的代码中使用了示例图。
代码
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
grid = both, %grid in the picture
height=10cm, %height of the figure
width=\textwidth,
% axis x line=middle,%remove the top x axis line
legend style={draw=none}, %remove the box, options- none, white, black
%-------------------------------------------
xlabel style={xshift=-4.2cm}, %shifting the x line text -0.2
xlabel style={yshift=-1.2cm}, %shifting the x line text -0.2
ylabel style={yshift=0.3cm}, %shifting the y line text
%-------------------------------------------
ylabel=Accuradfdcy Value {\%},
xlabel=number of best terms,
]
\addplot {x};
\addplot {x^2};
\end{axis}
\end{tikzpicture}%
\end{document}