How is the MarkerSize of a 'Circle' marker defined
245 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm ploting a 'Circle' marker using the 'plot' command. I'm setting the marker size using 'MarkerSize' property. e.g.:
plot(x,y,'or','MarkerSize',10);
Figure 'Units' are 'pixels'.
My question is what does the number 10 means (in pixles)? I played with it and it is not the radius or diameter in pixels. Any suggestions?
Thanks, Moran
0 个评论
采纳的回答
Daniel Shub
2012-7-31
The circle marker size appears to be the number of points in the diameter. For the other markers, it is not so clear. You can 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. I chose 72 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);
4 个评论
Daniel Shub
2012-7-31
@Moran you need to watch your terminology. I set the units of the AXIS and not the FIGURE. Neither of which are the OBJECT. Some OBJECTs have a UNITS property, and others do not. In the case of OBJECTs of type LINE, which markers are, there is no UNITS property.
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!