How can I put a point (mark) in a PGFPlots graph at every x values?
For example, I have the following graph:
Produced by the following code:
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable} % For \pgfplotstableread
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}[baseline,trim axis left,trim axis right]
\begin{axis}[
y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=2,
/tikz/.cd
},
enlargelimits=true,
minor tick num=1,
width=\textwidth,
ylabel near ticks,
xlabel near ticks,
ytick={0,0.25,...,1},
xtick={0,1,...,4},
ylabel={Weight $w$},
xlabel={Slot $s$},
]
\addplot[domain=0:4,dashed]{0.31622776601683794^x};
\addplot[domain=0:4.0001,thick,const plot]{0.31622776601683794^floor(x)};
\end{axis}
\end{tikzpicture}
\end{document}
I tried using several mark
primitives, mark step, mark phase, but was unable to produce the desired output. Desired output:
samples=5
to the second plot.