I am trying to draw a logarithmically scaled timeline with TikZ. I tried starting from a snippet from chronlogy.sty:
\begin{tikzpicture}[baseline={(current bounding box.north)}]%
\draw [|->] (0,0) -- (\thedeltayears*\unit+\unit, 0);%
\foreach \x in {1,...,\thedeltayears}%
\draw[xshift=\x*\unit] (0,-.1\unit) -- (0,.1\unit);%
\addtocounter{deltayears}{1}%
\foreach \x in {\thestepstart,\thestep,...,\thestepstop}{%
\pgfmathsetlength\xstop{(\x-\theyearstart)*\unit}%
\draw[xshift=\xstop] (0,-.3\unit) -- (0,.3\unit);%
\node at (\xstop,0) [below=.2\unit] {\x};}}{%
\end{tikzpicture}%
The horizontal axis should look like the x-axis of a logarithmic plot with main ticks labeled ...,10^-2,10^-1,10^0,10^1,... and minor ticks without lables at a position corresponding to log10 of 2*10^-2, 3*10^-2, ... etc. Since the lower and upper limits should be customizable I need to implement an appropriate scaling function in TikZ. However, I already fail to alter the simple computation xshift=\x*\unit to something like xshift=log10(pow(10,\x))*\unit. How can I realize non-elementary computations in this place? Note that I consciously avoid the builtin \begin{axis}, because eventually I want to add labels and a second axis with different units etc. I also tried using \pgfmathparse and \pgfmathresult with equal success.


\unitwhich is used by chronology (it is passed as an argument to the environment defined by this package and necessary to be able to scale the graph to the desired size). When I add\newlength{\unit}\setlength{\unit}{1pt}, I can e.g. change(\n,4pt)to(\n,4*\unit)and it works. But changing{\draw (\n+\x,-2pt) -- (\n+\x,+2pt) ; }in the same way (I.e. multiplying all length by\unit) fails. Why is that? – highsciguy May 16 '14 at 13:55\unit*2and or-\unit*4. – Tarass May 16 '14 at 14:09