필터 지우기
필터 지우기

How to change the numbering format of a datacursor (or datatip) for histograms?

조회 수: 9 (최근 30일)
Hi,
I am drawing a histogram using the histogram function and I manage to change the y-axis values of my histogram from scientific notaion to long format --> x10ˆ4 to 10000. For that, I used the below code.
ay = gca;
ay.YRuler.Exponent = 0;
ax = gca;
ax.XRuler.Exponent = 0;
However, I haven't been able to change the format of the Value shown in e-notation (see below, it's still shown as 2.381e+04) from scientific format to long. I don't know how to access the variable/attribute that is the Value in the datacursor so that I can format it.
Thanks for your help.

채택된 답변

darova
darova 2020년 3월 11일
Try to edit Text Function
Change precision to 6 or 8 (places fo digits)
  댓글 수: 2
Suzan Doornwaard
Suzan Doornwaard 2020년 3월 12일
Hi darova,
Thanks for your suggestion. Is that an old menu or is that menu only available on Windows Interfaces? I have a Mac using Matlab R2018b and I've tried to access that menu via right clicking literally every where (including the data tip) but there's no such menu.
I can access the Property Inspector but that's also an ocean full of values and I've not seen an attribute similar to the one in your screenshot.
Any idea?
Suzan Doornwaard
Suzan Doornwaard 2020년 3월 12일
Oh I see. I realize that I forget to enable the datacursormode.
I can now access the menu. Thanks again darova.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by