I would like to make a matrix plot with the following script, where all 0 values are displayed in white all other values according to the colormap. Is there a masking feature in pgf plot? Could it be done with a feature which assigns a certain color to all values below a certain value? All values I want to display according to the colorplot are larger than 0.



xtick=data, ytick=data,
\addplot3[matrix plot]
table[] {
1 1 1
2 1 2
3 1 0

1 2 0
2 2 3
3 2 1 


I have this code at the moment which outputs a result like this: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.