Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % contents of matrix.txt
- x y v
- 0 0 78
- 1 0 63
- 2 0 42
- 3 0 51
- 4 0 99
- ...
- % MWE
- documentclass{standalone}
- usepackage[utf8]{inputenc}
- usepackage{ifthen}
- usepackage{tikz}
- usepackage{pgfplots}
- usetikzlibrary{positioning}
- begin{document}
- begin{tikzpicture}
- begin{axis}[enlargelimits=false, axis lines=none, colormap/blackwhite]
- addplot [
- matrix plot,
- visualization depends on={value ifthenelse{thisrow{v} < 90}{white}{black} as tcolor},
- nodes near coords,
- scatter/@pre marker code/.append style={/tikz/text=tcolor},
- mesh/cols=8,
- point meta=explicit,
- ] table [x=x, y=y, meta=v] {matrix.txt};
- end{axis}
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment