I would like to have the data series for a sparkline defined in terms of a macro -- or some alternative -- as opposed to have it set explicitly in the sparkline environment itself. My attempts so far have failed. As an MWE, the following would do:
\documentclass[12pt]{memoir}
\usepackage{xcolor,tikz,sparklines}
\begin{document}
\xdef\SparkMacro{0 1 0.5 1.5 1 0.25}
\renewcommand{\sparklineheight}{1.75}
\begin{sparkline}{3}
\sparkrectangle 0 1.75
\spark \SparkMacro\ / % doesn't work
% \spark 0 1 0.5 1.5 1 0.25 /% does work
\end{sparkline}
\end{document}
How could I have those data passed to the environment sparklinewithout having to type (or copy and paste) them explicitly?
SparkMacrobut use\SparkMacro{} /– Aditya Sep 02 '12 at 17:27