Hallo zusammen,
ich bin gerade dabei eine Tabelle mithilfe von pgfplotstable zu erstellen. Ich würde gerne eine bedingte Formatierung für die einzelnen Zellen (bzw. Spalten) vorgeben. In dem Manual stand folgende Lösung:
columns/account1/.style={fonts by sign={\color{green}}{\color{red}}}
Das gilt allerdings nur für positive und negative Werte. Wie kann ich eine Formatierung festlegen für z.B. alle Zellen einer Spalte, die <400 oder =100 sind?
Weiterhin würde ich gerne booktabs verwenden, also horizontale Linien.
Bisher habe ich folgenden Code:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{pgfcalendar}
\usepackage{booktabs}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.13}
\begin{filecontents}{accounts.dat}
account1 account2 account3
60 1200 400
120 1600 -410
-10 1600 410
1800 -500 410
2300 500 410
800 -192 100
\end{filecontents}
\begin{document}
\pgfplotstabletypeset[
columns={account1, account2, account3},
column type=r,
columns/account1/.style={fonts by sign={\color{green}}{\color{red}}}
]{accounts.dat}
\vspace{5cm}
\begin{tabular}{rrr}
\toprule
account1 & account2 & account3\\
\midrule
60 & 1200 & 400 \\
120 & 1600 & -410 \\
-10 & 1600 & 410 \\
1800 & -500 & 410 \\
2300 & 500 & 410 \\
800 & -192 & 100 \\
\bottomrule
\end{tabular}
\end{document}
Könnt ihr mir vielleicht helfen oder mir einen Hinweis geben?
Viele Grüße