I am trying to build a matrix in which each element is in one of two states. (ising model ..)
Now I would like to have one state and the other is white. This works using
[i,j] = find(S); figure(gcf); plothandle = scatter(i,j); axis([0 nNodes+1 0 nNodes+1]);
when S contains spins, and one state is 0. (find returns a matrix of only nonzero elements)
To have a useful graph, marker sizes must be 1x1 in RELATIVE coordinates. Therefore, if the entire matrix S is in a state other than zero, everything will be colored.
However, it seems that Matlab only allows MarkerSizes in dots or inches. How can i solve this?
One of my ideas was that I figure out the size of the point axes, and then I can easily calculate how large my markers are. Then I will need to create a callback function if I want to zoom in and so on. In addition, I have not yet found a way (without an image display tool) to find out the absolute size of my axes.
To clarify what I want: how could I build a chessboard using a matrix with 1 for black and 0 for white squares?
source share