I try to change the frequency of plot markers. To be more precisely: I create a figure in which six graphs are depicted. To distinguish the graphs from each other, I use solid and dashed lines with a different gray scale, but I also want to add markers. However, these markers should not appear for each data entry (thus sample), but let's say every 50 samples one marker. This is to avoid a chaotic figure, because there are around 600 data entries, for each time step one. I have added the code below.
Code: Select all
\documentclass[conference]{IEEEtran}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{plotmarks}
\begin{document}
\begin{figure*}[!t]
\centering
\begin{tikzpicture}
\begin{axis}[
xmin=0,
xmax=600,
width=18cm,
height=8cm,
legend pos=north east,
xlabel = Time {[sec]},
ylabel = Power {[p.u.]}
]
\addplot[solid,color=black!30!white] file {./data/M2T1opt.dat};
\addlegendentry{\footnotesize Turbine 1};
\addplot[dashed,color=black!30!white] file {./data/M2T1optO2.dat};
\addlegendentry{\footnotesize Turbine 1};
\addplot[solid,color=black!70!white] file {./data/M2T2opt.dat};
\addlegendentry{\footnotesize Turbine 2};
\addplot[dashed,color=black!70!white] file {./data/M2T2optO2.dat};
\addlegendentry{\footnotesize Turbine 2};
\addplot[solid,mark=none,color=black] file {./data/M2Topt.dat};
\addlegendentry{\footnotesize 2 turbines};
\addplot[dashed,mark=none,color=black] file {./data/M2ToptO2.dat};
\addlegendentry{\footnotesize 2 turbines};
\end{axis}
\end{tikzpicture}
\end{figure*}
\end{document}
Many thanks for your help
Simon