How do I plot a function of a binary logarithm with TikZ? Say that I want to plot f(x) = log_2 x
.
[Tex/LaTex] Plot a function of a binary logarithm with TikZ
pgfplotsplottikz-pgf
pgfplotsplottikz-pgf
How do I plot a function of a binary logarithm with TikZ? Say that I want to plot f(x) = log_2 x
.
Best Answer
The
pgfmath
function that you can use directly in TikZ is calledlog2
. PGFplots uses thefpu
library, which doesn't have this function, but you can get the same result by usingln(x)/ln(2)
instead: