# pgfplots: How to draw line from 0-like value with loglogaxis

I want to plot some vertical lines (to mark control points on my histogram).

Code to draw the line looks like:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}
\addplot+[sharp plot] coordinates {(14.5, 0.0) (14.5, 1000)};
\end{loglogaxis}
\end{tikzpicture}
\end{document}


But result looks like first point was just dropped, because there is no value in logarithmic coordinate to be equal zero. How can I draw line from X axis?

-
Be more specific. Where do you want to have your first point? If it is at y=0.0, it appears at minus infinity. – Turion Mar 27 '12 at 12:10
I want to draw line from X axis. Like a grid line, but with it's own style and label in legend. – iNode Mar 27 '12 at 12:21
Yes this is a good option in my case. Thank you! – iNode Mar 27 '12 at 13:26

pgfplots comes with a ycomb plot style, which does what you want:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}
\end{loglogaxis}
\end{tikzpicture}
\end{document}

-

Because you are trying to address an inf value on an axis, as far as I know, pgfplots by default discards that (unbounded coords=discard). The quickest fix is to put some small positive value instead of zero and then manually adjust the y axis limits such that the perturbation stays out of the plot.

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[ymin=500]
\addplot+[sharp plot] coordinates {(14.5, 0.1) (14.5, 1000)};
\end{loglogaxis}
\end{tikzpicture}
\end{document}


-