1

我使用以下命令创建了一个绘图(pgfplots)。我想myFile.csv根据某些条件过滤一些行。例如 colmyZcol > 3或中的值myZcol=3。可能吗?

\documentclass[tikz]{standalone}

\usepackage{pgfplots}
\pgfplotsset{ytick style={draw=none}, xtick style={draw=none}}
\usetikzlibrary{patterns}


\begin{document}
\begin{tikzpicture}
\footnotesize
    \begin{axis}
    \addplot[color=purple,mark=o]  table [x=myXCol,y=myYCol,col sep=comma, dashed, ] {myFile.csv}; %    
\legend{ser1}
\end{axis}
\end{tikzpicture}

\end{document}

假设myFile.csv是 -

myXCol,myYCol,myZCol
1,2,3
4,5,6
7,8,9

我希望情节只抓取 where 的记录myZCol<7,也就是前 2 条记录。

先感谢您

4

0 回答 0