Created by Torbjørn T. 2016-09-06 View revision File snippet.txt Added Side-by-side diff More Ignore whitespace Hide word diff +\documentclass{standalone} +\usepackage{pgfplots} +\usepackage{pgfplotstable} +\pgfplotsset{compat = 1.13} +\pgfplotstableset{col sep = comma} + +\begin{document} +\pgfplotstableread{ +20, 1000 +70, 500 +}{\data} + +\begin{tikzpicture} +\begin{axis} + +\addplot[black] table[x index = 0, y index = 1, col sep = comma] {\data}; +\addlegendentry[]{040\_Mn} +\addplot[red!20!blue] table[x index = 0, y expr={\thisrowno{1} - 500}] {\data}; +\addlegendentry[]{023\_Mn} +\addplot[yshift=-2cm,red!20!blue] table[x index = 0, y index=1] {\data}; +\end{axis} +\end{tikzpicture} + +\end{document}