Axis dimensions in points
조회 수: 2 (최근 30일)
이전 댓글 표시
Can someone tell me how to determine the dimensions of the field of the current axis in points?
I'm working on a routine to plot a scatter plot in which the regularly spaced points should nearly touch. To do this automatically, I need to know the length of the x and y axes in points. Then I can divide by the x and y axis limits to calculate the appropriate areas for the scatter points. If anyone has a better way to do this, I'm all ears.
Raph
댓글 수: 0
채택된 답변
C.J. Harris
2013년 5월 17일
Here is an example of what I think you want to do:
plot(1:10,1:10);
h = gca;
set(h, 'Units', 'Points');
nPos = get(h, 'Position');
nXLen = nPos(3) - nPos(1);
nYLen = nPos(4) - nPos(2);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!