1

I have the following code:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\pgfplotsset{compat=newest}

\begin{document}
    \begin{tikzpicture}
        \begin{axis}[ymode = {log}]
            \addplot+ [ybar interval, mark=none, fill=blue, draw=white] coordinates {
            (0.0, 2.1940887816983409e-7)
            (0.1, 0.0002414449312833731)
            (0.2, 2.1755844184791984e-5)
            (0.3, 8.69705071299704e-6)
            (0.4, 3.0320720874795145e-6)
            (0.5, 6.87304919568155e-8)
            };
        \end{axis}
    \end{tikzpicture}
\end{document}

which produces:

enter image description here

The probabilities are positive values, but because the axis is in log mode I assume it interprets them as negative values and draws the bars to log(x) = 0. How do I get PGFPlots to plot the bars such that they rise up from the bottom of the axis?

Thank you.

Mageek
  • 153
  • 1
  • 4

0 Answers0