\documentclass[border=5pt]{standalone}
\usepackage{statistics}
\begin{document}
\StatsRangeData \tips = { 15.95, 12.60, 20.75, 22.20, 8.80, 15.60, 19.50, 20.60, 24.15, 9.85, 11.80, 12.75, 15.40, 16.90, 18.45, 17.10, 14.35, 23.30, 9.20, 16.80, 5.45, 5.40, 7.80, 28.85, 9.25 }
(\IN[5;9;[, \IN[9;13;[, \IN[13;17;[, \IN[17;21;[, \IN[21;25;[, \IN[25;29;[)
%\detokenize\expandafter{\tips}
\statisticssetup{graph/values=Classes}
\statisticssetup[graph]{counts=Counts}
\StatsGraph \tips[ x/axis = {ticks={major={at={5, 9, 13,17,21,25,29}}}, grid = none}, y/axis = {grid = none}]
\end{document}
答案1
像这样?
如果是,请按如下方式更正代码的最后一行:
\StatsGraph \tips[ x/axis = {ticks={major={at={5, 9, 13,17,21,25,29}}}, grid = none}, y/axis = {grid = none},axissystem={end labels, clean}]
编辑:我能得到的更好的是这张图表:
最后一行代码:
\StatsGraph \tips[x/axis = {grid = none}, axissystem={end labels, clean}, y/axis = {grid = none},axissystem={end labels, clean}]
答案2
只需删除轴上的细小刻度即可x
!!!
\documentclass[border=5pt]{standalone}
\usepackage{statistics}
\StatsRangeData \tips = { 15.95, 12.60, 20.75, 22.20, 8.80, 15.60, 19.50, 20.60, 24.15, 9.85, 11.80, 12.75, 15.40, 16.90, 18.45, 17.10, 14.35, 23.30, 9.20, 16.80, 5.45, 5.40, 7.80, 28.85, 9.25 }
(\IN[5.0;9.0;[, \IN[9;13;[, \IN[13;17;[, \IN[17;21;[, \IN[21;25;[, \IN[25;29;])
%\detokenize\expandafter{\tips}
\statisticssetup{graph/values=Classes}
\statisticssetup[graph]{counts=Counts}
\begin{document}
\StatsGraph \tips[
x/axis = {
ticks={
major={at={ 5.0, 9.0, 13, 17, 21, 25, 29 }},
minor={style={draw=none}}
},
grid = none
},
y/axis = {
grid = none
}
]
\end{document}