开发者

How can I set the actual scale of axes in MATLAB?

I have 4 sets of 3D scatter data that i want to plot in MATLAB subplots. However, I would like the scale to be the same in each—so that sizes in each dataset can be roughly visually compared between plots.

What makes this slightly difficult is that the limits for each plot are arbitrary, so cannot be set to a specific value.

Is there a way to set the scale of a MATL开发者_如何学CAB plot explicitly? Something like "set each pixel to be 4 units" would be great.


If you just want to set them all to be the same as whatever the scale of the first one happened to be, just do this:

<Plot your first plot>
limx = get(gca, 'XLim');
limy = get(gca, 'YLim');
<Plot your second plot>
set(gca, 'XLim', limx);
set(gca, 'YLim', limy);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜