A pixel diagram is a way to visualize a graph, or even the non-zero entries in a matrix. It is typically used to help visualize graphons. I am trying to use Tikz to draw these diagrams. An example can be seen below (taken from here)
So the idea is as follows: for a square n x n matrix, draw an n x n grid, and make the i-jth pixel black if the i-jth element of the matrix is non-zero (or there is an edge between nodes i and j).
Is it possible to enter a data file containing the matrix data and have tikz generate the pixel diagram? I am very much a tikz novice and don't even know where to begin here...
thanks!

matrix plotwhich comes withpgfplots. – Aug 23 '19 at 15:44