# Some question about “tikzpicture” to draw the graphs

I have drawn graphs of two types. However, I do not want to add a small line associated with the x-axis name.

Figure 1 shows a small line with the axis name, red box. Figure 2 shows that the small line is inside, so I want it to come out the same or not.

Could you tell me how?

The code: Code 1.

\begin{tikzpicture}
\begin{axis}[
%small,
ybar,%=8pt, % configures ‘bar shift’
% enlargelimits=0.1,
ylabel={Ratio},
ymin=0,ymax=1,
height=7cm,
symbolic x coords={R-F, R-Mth, AP-F, AP-Mth},
%xtick=data,
tick label style={font=\footnotesize},
legend style={at={(1,1)},anchor=north east,
legend columns=-1},
nodes near coords,
every node near coord/.append style={font=\tiny},
nodes near coords align={vertical},
]
\addplot coordinates {(R-F, 0.8) (R-Mth, 0.71) (AP-F, 0.68) (AP-Mth, 0.62)};
\addplot coordinates {(R-F,  0.20) (R-Mth, 0.62) (AP-F, 0.59) (AP-Mth, 0.64)};
\legend{Changed, Maintained}
\end{axis}
\end{tikzpicture}


Code 2.

 \begin{tikzpicture}
\begin{axis}[
boxplot/draw direction=y,
ylabel={log(ratio of changes)},
tick label style={font=\scriptsize},
height=7cm,
ymajorgrids=true,
ymin=-1,ymax=1,
cycle list={{blue}},
boxplot={
%
% Idea:
%  place the
%  group 1 at 0.3333 and 0.6666
%  group 2 at 1.3333 and 1.6666
%  group 3 at 2.3333 and 2.6666
%  ...
% in a formular:
% draw position={1/3 + floor(\plotnumofactualtype/2) + 1/3*mod(\plotnumofactualtype,2)},
%
% that means the box extend must be at most 0.33333 :
% box extend=0.33
},
% ... it also means that 1 unit in x controls the width:
% x=1cm,
% ... and it means that we should describe intervals:
xtick={0,1,2,3,4},
% x tick label as interval,
xticklabels={,R-F,R-Mth,AP-F,AP-Mth},
tick label style={font=\scriptsize},
nodes near coords,
every node near coord/.append style={font=\tiny},
nodes near coords align={vertical},
]
table[row sep=\\,y index=0] {
data\\
0.764\\
0.538\\
0.075\\
-0.493\\
-0.785\\
};

table[row sep=\\,y index=0] {
data\\
0.175\\
0.013\\
0.006\\
-0.093\\
-0.9\\
};

table[row sep=\\,y index=0] {
data\\
0.9\\
0.659\\
0.357\\
-0.451\\
-0.816\\
};

table[row sep=\\,y index=0] {
data\\
0.280\\
0.0482\\
-0.0787\\
-0.326\\
-0.795\\
};

% \addplot [domain=-10:10, thick, red] {0.0};

\end{axis}
\end{tikzpicture}

• Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. A MWE should compile and be as small as possible to demonstrate your problem. it's much easier to help you if we have full working code to start from. – Andrew Apr 26 at 2:33
• Are you looking for xtick align=outside, or xtick align=inside,? – marmot Apr 26 at 3:08
• Thank you. I solved the problem by adding the option, "xtick align=outside". – Kim Rose Apr 26 at 3:17