How to change the Z axis scale of the landscape?

조회 수: 2 (최근 30일)
Ramya Narasimhan
Ramya Narasimhan 2011년 7월 11일
I used Matlab 6.5 to draw 3D energy landscape. The minima is coming somewhere close to zero while the actual minima is -50.0 kcal/mol. I tried to push the landscape done, but of no use. I used the following codes % Load the data and extract the X, Y, and Z information load mcle60_proj.txt X = mcle60_proj(:,1); Y = mcle60_proj(:,2); Z = mcle60_proj(:,3); colormap('jet');
% Determine the minimum and maximum X and Y values
minX = min(X); minY = min(Y); minZ = min(Z);
maxX = max(X); maxY = max(Y); maxZ = max(Z);
axis([minX maxX minY maxY minZ maxZ]);
% [Xi,Yi] = meshgrid([minX:.31:maxX],[minY:.31:maxY])
[Xi,Yi] = meshgrid([minX:.282:maxX],[minY:.282:maxY])
rotate3d on;
Zi = griddata(X,Y,Z,Xi,Yi);
contour(Xi,Yi,Zi);
My X and Y axis are first two principal coordinates. Can anyone suggest me to figure out the problem? Thank you Ramya

답변 (1개)

Jan
Jan 2011년 7월 11일
I do not understand, what the problem is.
"The minima is coming somewhere close to zero while the actual minima is -50.0 kcal/mol."
What is the difference between minima and actual minima ?
I tried to push the landscape done, but of no use.
How did you try to push the landscape down (?) and what exactly does "no use" mean?
Do you want to change the limits of the Z-axis or the Z-values?
PS. Sorry, this is actually a comment to the question. But without formatting it looked too ugly.
  댓글 수: 2
Ramya Narasimhan
Ramya Narasimhan 2011년 7월 11일
when the plot is drawn the landscape minima is around zero of the Z-axis, but the minimum value of Z-axis is -52.0. I tried the aspect property of the figure, but still the Z-axis has not changed.
I changed the Z-axis limits also, but the figure remains same.
I hope my problem is clear right now.
Jan
Jan 2011년 7월 11일
@Ramya: At least for me the problem is not clear. If you change the Z-axis limits, the appearence of the figure *must* be changed. Is this correct: The data have a minimum of 0 (please check this again by "min(Zi(:))"), but the lower Z-axis-limit is 52? And does "set(AxesHandle, 'ZLim', [0, inf])" (or another suiting upper value) help?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by