Contour Plot question: How to set precision values for given heights

조회 수: 5 (최근 30일)
Hey,
this seems like a silly question, but I can't figure out how to set specific precision values for heights given in a contour plot. For instance, if the contour plot gives heights "345.642, 388.789", etc., I would want it to display "346, 389". If I have contour plot:
[C,h] = contour (x,y,z,10)
clabel(C,h)
is there a property value in the "clabel" that sets the precision of the variables? I looked through the list of clabel and text property values given in the help files, and I can't find anything that shows how to set numeric precision. Anyone have any ideas? Thanks.
  댓글 수: 1
Maryam
Maryam 2013년 7월 29일
I have the same question. did you figure out how to set the number precision for your contour labels?

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

채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 22일
There is no way to set the precision. However, you can supply your own list of contour heights: pass in the heights you want instead of passing in "10".

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by