# pgfplots: bars starting from the bottom of the screen

The following example:

\begin{tikzpicture}
\begin{axis}[ybar,ymin=-5,ymax=0]
(1,-1)
(2,-2)
(3,-3)
};
\end{axis}
\end{tikzpicture}


compiles to this bar chart:

I'd like the bars to start from the bottom of the screen instead of the top. Are there any possibilities to set the origin point to the bottom?

Thanks for your help ;)

Edit: Like this. The Plot starts from the bottom(most negative value) and move to the nagative value. This example works with a log scale. how can i do this with my linear scale?

\begin{tikzpicture}
\begin{axis}[ybar, ymode = log, log origin=infty]
(1,1e-1)
(2,1e-2)
(3,1e-3)
};
\end{axis}
\end{tikzpicture}


• But the values are negative anyway, how would you make the bars go "up"? – zyy Apr 25 at 20:56
• The Plot should start from the bottom(most negative value) and move to the nagative value. I found an example with a log scale. But how can i do this with a linear scale? – user187571 Apr 26 at 7:43

Like this?

\documentclass[margin=3mm]{standalone}

\usepackage{tikz-cd,pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}

\begin{tikzpicture}[rotate=180]
\begin{axis}[ybar,ymin=-5,ymax=0,
tick label style={rotate=180},
x dir=reverse,
y dir=reverse,
ylabel near ticks, yticklabel pos=right,
symbolic y coords={-5,-4,-3,-2,-1,0},
axis x line*=top,
axis y line*=right
]