
Quero adicionar um intervalo personalizado ao eixo x para o gráfico anexado. Ele deve começar em 20 e depois aumentar em 5. Por exemplo, 20, 25, 30, ......50. Pergunta semelhante foi feita antes, mas foi encerrada sem qualquer resposta. Muito obrigado antecipadamente. Meu código está descrito abaixo.
\begin{figure}[!h]
\begin{centering}
%\begin{adjustwidth}{-1.5cm}{}
\begin{tikzpicture}
\begin{axis}[
footnotesize,
xbar,
width=11.0cm, height=4.5cm,
enlarge y limits=0.01,
enlargelimits=0.07,
%xlabel={\#participants},
symbolic y coords={Al, Stor, Pro, Ser, Domain, Services},
ytick=data,
nodes near coords, nodes near coords align={horizontal},
every node near coord/.append style={font=\footnotesize},
]
\addplot coordinates {
(48,Services) (27,Domain) (26,Ser) (25,Pro) (23,Stor) (37,All)};
\end{axis}
\end{tikzpicture}
\caption{Design}
%\end{adjustwidth}
\label{fig:SQ21}
\end{centering}
\end{figure}
Responder1
Como já foi dito no comentário abaixo da pergunta, basta adicionar xmin=20
e xtick distance=5
às axis
opções para conseguir o que deseja.
% used PGFPlots v1.17
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
footnotesize,
xbar,
width=11.0cm, height=4.5cm,
% ---------------------------------------------------------------------
% added
xmin=20,
xtick distance=5,
% ---------------------------------------------------------------------
enlarge y limits=0.01,
enlargelimits=0.07,
symbolic y coords={All, Stor, Pro, Ser, Domain, Services},
ytick=data,
nodes near coords,
nodes near coords align={horizontal},
every node near coord/.append style={font=\footnotesize},
]
\addplot coordinates {
(48,Services) (27,Domain) (26,Ser) (25,Pro) (23,Stor) (37,All)
};
\end{axis}
\end{tikzpicture}
\end{document}