Scatter3 does not update axes limits when translated
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I am having trouble with auto-updating axes limits with scatter3 after using translation. I would like them update but they do not. invariant to "hold" and XLimMode (and the such) are on auto.
I have written a code for example below.
Thanks, Alon
%create ordinates
X=-1:0.1:1;
Y=-1:0.1:1;
Z=X.^2+Y.^2;
%scatter and obtain handle
H=scatter3(X,Y,Z);
%create translation handle
Transltn=makehgtform('translate',[100,0,0]);
Transfm=hgtransform('Matrix',Transltn);
%implement translation
H.Parent=Transfm;
댓글 수: 11
dpb
2018년 9월 18일
"I was looking to have one handle that includes all [X,Y,Z] data..."
I've been kept stewing over the above as I didn't understand what you were driving at until just now...at least I think I do now.
If you're speaking of the data being addressable as
hS3=scattter(X,Y,X,...);
and then using
hS3.[X|Y|Z]Data
instead of just X or Y or Z, then there's not too much difference between that and writing
hL3=arrayfun(...
and using the brackets to assimilate the comma-separate list from hL3.XData as
[hL3.XData].'
it's the same array. Of course, you could make a struct from the original data as well if like the nomenclature.
I'm still left wondering why you would write it using the struct form from the figure instead of just using the original variables X,Y,Z, though?
답변 (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!