I have the following code (taken as an example from: Scatterplot with data from CSV file and trendline) which plots a 3d scatterplot from a csv file.
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots, pgfplotstable}
\usepackage{filecontents}
\begin{filecontents}{table.dat}
x y
0 1
100 3
150 2
200 5
300 6
\end{filecontents}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis x line=middle,
axis y line=middle,
enlarge y limits=true,
width=15cm, height=8cm, % size of the image
grid = major,
grid style={dashed, gray!30},
ylabel=steps,
xlabel=$n$,
legend style={at={(0.1,-0.1)}, anchor=north}
]
\addplot[only marks] table {table.dat};
\end{axis}
\end{tikzpicture}
\end{document}
Is there any way I can have only a few points plotted from the csv file?
\documentclassand ends with\end{document}and (b) add a small sample data file that we can play with. – Oct 30 '19 at 00:08\corrdindex. If you want to have this spelled out, please go the extra mile and provide us with something that makes it us easier to write an answer. – Oct 30 '19 at 02:32\coordindexbut I guess you figured that out.) Please let me know if your problem solved, or there is anything to do. – Oct 31 '19 at 02:02