用此代码生成的图表的 y 轴有问题:
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{datavisualization}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}
\datavisualization [
scientific axes=clean,
x axis={length=0.8\textwidth, ticks=some, label={Generation}},
y axis={length=0.56\textwidth, logarithmic, ticks={minor steps between steps}, grid, label={Costs}},
visualize as line/.list={best,average},
legend=north east inside,
best ={label in legend={text=best cost}},
average={label in legend={text=average cost}},
style sheet=vary dashing
]
data [format=named,set=best, read from file=bestGA.csv]
data [format=named,set=average, read from file=averageGA.csv]
;
\end{tikzpicture}
\caption{GA: graphical representation of costs improvement shown for the average and the best VA.}
\label{fig:GAimprovement:eb_555AICH}
\end{figure}
\end{document}
我希望标签也出现在小刻度(即8*10^6
、9*10^6
和1,1*10^7
)上。我在文档中看到小刻度没有标签,但有解决方法吗?我已经尝试过ticks={at={8000000,9000000,11000000}}
强制刻度,但无济于事……