Home Relative Markersize in Matlab plots
Reply: 0

Relative Markersize in Matlab plots

user1153
1#
user1153 Published in April 24, 2018, 8:37 am

I am trying to plot a matrix where each element is in one out of two states. (ising model..)

Now, I would like to have one state colored and the other one white. That works using

[i,j] = find(S);
figure(gcf);
plothandle = scatter(i,j);
axis([0 nNodes+1 0 nNodes+1]);

when S holds the Spins and one state is equal to 0. (find returns a matrix of only non-zero elements)

To have a useful plot, the sizes of the markers should be 1x1 in RELATIVE coordinates. So if the whole matrix S would be in a state non-zero, everything would be colored.

However, it seems like Matlab only allows MarkerSizes in points or inches. How could I solve this?

One idea I had was, that I find out the point-size of the axes and then can easily calculate how big my markers should be. Then I would have to create a callback function if I want to zoom in and so on. Also, I have not yet found a way (without the image acq. toolbox) to find out the absolute size of my axes.

To clarify what I want: How could I plot a chessboard using a matrix with 1 for black and 0 for white fields?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.32506 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO