Tagged Questions
3
votes
1answer
100 views
Counter not working as expected in pgfplot
Using pgfplot (for the first time), I try to create a chart with horizontal bars, sort of. See the figure.
I know how to do it, but because the code is quite verbose and I have lots of data I've ...
4
votes
2answers
372 views
Increment counter in TikZ
How to increment counter in TikZ using code below:
\newcounter{ga} %counter
\setcounter{ga}{1}
\begin{tikzpicture}
\foreach \t in {1,...,10}{
\pgfmathparse{Mod(\t,2) == 1 ? 1 : 0}
...
3
votes
1answer
244 views
Using counter values as part of style name for plots
I figured I should be able to give a bunch of line styles and access them using counters. Sure enough, this works out fine; this document
\documentclass{article}
\usepackage{tikz,pgfplots}
...
2
votes
2answers
319 views
TikZ: Automatic Numbering of Nodes, \value{counterName}
\documentclass{standalone}
\usepackage{tikz}
\newcounter{xi}
\setcounter{xi}{0}
\newcommand{\foo}[0]{
\addtocounter{xi}{1};
\coordinate (x{\value{xi}}) at (1,2);
}
\begin{document}
...
5
votes
2answers
897 views
TikZ counter and logical comparison
Does TikZ have counter that is similar to for loop in c language and logical comparison? e.g.,
\foreach \x in {0mm,11.200000mm,...,33.600000mm}
{
counter++; <== is this possible in tikz
...
3
votes
2answers
395 views
Unexpected tikz/counter behaviour
What I've been trying to do, futilely, is to use the foreach[counter=\xi] x in {1,2,3} statement in tikz/pgf with LaTeX. This fails, every time. Whatever. So I moved on to trying to use a counter, ...