I'm working on a Latex project and I have to make some graphics.
In one of them, I need in the X axis to display some month of the year. For a test, I used : Aout,Sep,Oct,Nov,Dec When I write it directly in the Latex file, it is working. But I need it to be dynamic, I want to use it with a variable.
\def \test{Aout,Sep,Oct,Nov,Dec}
\begin{tikzpicture}
\begin{axis}[
symbolic x coords = {\test},
]
\addplot[] ...
\end{axis}
\end{tikzpicture}
Any idea how I can do it ?
/.expand once. Similar questions using variables or commands in pgfplots axis definitions - TeX - LaTeX Stack Exchange ; https://tex.stackexchange.com/questions/299237/tikz-pgf-plot-cyclic-shift-of-alphabetic-labels-on-x-axis/299277#299277 ; https://tex.stackexchange.com/questions/153853/pgfplots-how-to-load-distinct-symbolic-ticks-labels-from-file/153971#153971 -- if that does not solve the question to make the easier to answer post a MWE. – user202729 Dec 27 '22 at 09:59