Open pgf-tikz-bot opened 8 years ago
Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/143/#e99d Author: symbol-1 Timestamp: 2017-07-17 10:15:41.800000
(There is no yticks
. I assume ytick
)
According to the manual, the argument of ytick
is put inside a \foreach\y in{<argument>}
.
According to experiments, the argument of extra y ticks
is put inside a \foreach
as well.
And since \foreach
searchs for and returns literal patterns such as A(0),A(...),A(9)
, I do not think it is possible to evaluate functions (including 0-ary functions).
Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/143/#e99d/efa6 Author: mo-gul Timestamp: 2017-07-17 16:54:06.565000
Sure, I meant ytick
instead of yticks
. I'll correct that in a minute.
So you mean that there is no possibility to check (in something like a "special handler") for a function? Because I don't find it useful to write something like \pgfmathsetmacro{\ymin}{ymin}
...
Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/143/#e99d/efa6/0d1f Author: symbol-1 Timestamp: 2017-07-21 16:12:21.925000
There is an alternative of \pgfmathsetmacro
:
use \usetikzlibrary{math}
and then \tikzset{evaluate={\ymin=-4;\ymax=1;}}
.
By the way, there is another key called /pgf/foreach/evaluate=⟨variable⟩as⟨macro⟩using⟨formula⟩
.
In other words,
\foreach \x [evaluate=\x] in {2^0,2^...,2^8}{$\x$, }
will result in 1.0, 2.0, ..., 256.0 instead of the literal pattern.
Migrated from SourceForge https://sourceforge.net/p/pgfplots/bugs/143/ Author: mo-gul Timestamp: 2016-10-25 17:57:13.943000
While writing this answer I recognized that I cannot use "declared functions" in
(extra) ticks
while it is no problem to use them for the axis limits. Is that a bug or a feature?