TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to plot the following image using TikZ:

enter image description here

How do I generate an X-axis with logarithmic scaling using TikZ? For linear scaling I use this code:

\draw (3,0) -- coordinate (x axis mid) (21,0);

    \foreach \x in {3,...,21}
        \draw (\x,0pt) -- (\x,-3pt)
        node[anchor=north] {\x};

\node[below=0.8cm] at (x axis mid) {Physical dose [Gy]};
share|improve this question
Maybe it could be faster to use pgfplots – Lionel MANSUY Feb 18 '13 at 9:14
Yes, but I don't know how to remove the y-axis in pgfplots. – Eekhoorn Feb 18 '13 at 9:14
up vote 22 down vote accepted

This looks like a job for PGFPlots:

    y=1.5cm,            % y unit vector
    hide y axis,        % hide the y axis
    xmode = log,        % logarithmic x axis
    axis x line*=bottom,% only show the bottom x axis line, without an arrow tip
    xmin=1e-4, xmax=1e2,% range for the x axis
    xlabel = Dose in Sv
\addplot [no markers, line width=6pt] table {
0.002 1
0.004 1

share|improve this answer

It is not supposed to be the correct way to go. Feel free to edit!

enter image description here

\def\f[#1,#2]{!#1 log 4 add #2 8 div}
            ticksize=-1.5pt 1.5pt,
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.