I am trying to create a 2D plot in which the x
-label ticks are pictures, similar to what is posted here, with the difference that the images be created at the compile time in a parametric manner. The x
-labels, which are graphics, are actually dependent on some input CSV file that determines the shape of the graphics. illustrated below just as an example. As can be seen, the arrows are my x
labels are in different graphics.
How should I approach this problem? I tried to define parameters needed such as
\newcommand{\PSI}{45}
\newcommand{\PHI}{45}
\newcommand{\cosPSI}{cos(\PSI)}
\newcommand{\sinPSI}{sin(\PSI)}
% These are just example to show my approach to this problem
% ...
\newcommand{\myFirstLabel}{\tikz \draw (0,0) -- (1,1);}
I also tried to use:
\newcommand{\myFirstLabel}{\begin{tikspicture} ...}
but the compiler complains about this. I wanted to see if I could have something like the following such that each new command create the graphical label using the parameters that I defined in the preamble.
xticklabels={\myLabel2, \myLabel2, ...}
Is this doable using LateX?
\documentclass
and the appropriate packages that sets up the problem and at least works without the compile time customization. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. My recommendation would be to use a combination of\newcommand
,\tikzset
and possibllypgfkeys
(depending on the level of customization). – Peter Grill Jun 15 '16 at 5:42