如何隐藏 pgfplotstable 中的一列

如何隐藏 pgfplotstable 中的一列

如何隐藏parameter a下表的列(标题和数据)。

\documentclass{article}
\usepackage[letterpaper, margin=0.5in]{geometry}
\usepackage{pgfplotstable}

\begin{document}

\pgfplotstabletypeset[
  col sep=comma,
  columns={Name,{para a},{para b},{para c},{para d}},
  columns/Name/.style={column type={r},string type},
  columns/{para a}/.style={column type={r},string type},
  columns/{para b}/.style={column type={r},string type},
  columns/{para c}/.style={column type={r},string type},
  columns/{para d}/.style={column type={r},string type},
  ]{
  Name,para a,para b,para c,para d
  test1,1,2,3,4
  test2,2,3,4,5
  test3,3,4,5,6
  test4,4,5,6,7
}

\end{document}

答案1

省略键将columns删除该列

\documentclass{article}
\usepackage[letterpaper, margin=0.5in]{geometry}
\usepackage{pgfplotstable}

\begin{document}

\pgfplotstabletypeset[
  col sep=comma,
  columns={Name,{para c},{para d}},
  columns/Name/.style={column type={r},string type},
  columns/{para a}/.style={column type={r},string type},
  columns/{para b}/.style={column type={r},string type},
  columns/{para c}/.style={column type={r},string type},
  columns/{para d}/.style={column type={r},string type},
  ]{
  Name,para a,para b,para c,para d
  test1,1,2,3,4
  test2,2,3,4,5
  test3,3,4,5,6
  test4,4,5,6,7
}

\end{document}

谢谢!@percusse

相关内容