Properties of the plot marker shapes
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
In answering this question, I realized that I do not understand how MATLAB defines its markers in plots. For a marker of a given size plotted at a point (x,y), what defines where it will be "centered" and its width and height?
If I create a square axis with x and y limits of -1 to 1 that is scale inches high and wide
scale = 4;
set(gca, 'Units', 'Inches')
set(gca, 'Position', scale*[0.25, 0.25, 1, 1])
set(gca, 'YTickLabel', [])
set(gca, 'XTickLabel', [])
axis([-1, 1, -1, 1])
axis square
box on
hold on
and then plot all the symbols to be scale*72 units big (since there are 72 points in an inch)
plot(0 , 0, '.', 'MarkerSize', scale*72);
plot(0 , 0, 'o', 'MarkerSize', scale*72);
plot(0 , 0, 'x', 'MarkerSize', scale*72);
plot(0 , 0, '+', 'MarkerSize', scale*72);
plot(0 , 0, '*', 'MarkerSize', scale*72);
plot(0 , 0, 's', 'MarkerSize', scale*72);
plot(0 , 0, 'd', 'MarkerSize', scale*72);
plot(0 , 0, 'v', 'MarkerSize', scale*72);
plot(0 , 0, '^', 'MarkerSize', scale*72);
plot(0 , 0, '<', 'MarkerSize', scale*72);
plot(0 , 0, '>', 'MarkerSize', scale*72);
plot(0 , 0, 'p', 'MarkerSize', scale*72);
plot(0 , 0, 'h', 'MarkerSize', scale*72);
I get the following result

The documentation say . is plotted at 1/3 the size. If you scale it up, then . and o are the same size.
It doesn't appear that the symbols are equal diameter, radius, or area. I don't think they are equal circumference (although I haven't proven that to myself yet). It looks like they might be centered on the center of gravity, but again I have proven this yet.
Do the marker sizes and locations make sense from a graphical representation standpoint?
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!