4
votes
1answer
51 views

\foreach not behaving in axis environment

Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the \foreach in the MWE. It should produce several horizontal lines but only produces the one with the ...
5
votes
2answers
223 views

Problems using `addlegendentry` in a loop with `pfgplots`

I have some spectra to plot, which I exported from the Siemens Xray toolbox, which works nicely with pgfplots. Since these are multiple files that look the same I think I can do it with a for loop, ...
5
votes
3answers
146 views

pgfplotsinvokeforeach is invoked only twice

I would like to plot the family of curves with equation xy=c for several values of c. I also want each curve to be labeled with the value of c it corresponds to. Here is my MWE: ...
2
votes
1answer
435 views

conditional inside a pgfplotsinvokeforeach loop

I'm using \pgfplotsinvokeforeach to do mathematical computations inside the \addplot options. Now I need a conditional to decide whether to plot a line or not depending on the current index of the ...
2
votes
2answers
757 views

pgfplots: setlength inside foreach

I have the following code, where the size of the cube marks is set to \x inside a foreach loop: \begin{tikzpicture} \begin{axis}[axis lines=none] \newlength{\mylen} \foreach \x in {1,2,...,10} ...