![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/276626/image.png)
How to change the numbering format of a datacursor (or datatip) for histograms?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Suzan Doornwaard
am 11 Mär. 2020
Kommentiert: Suzan Doornwaard
am 12 Mär. 2020
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/276505/image.png)
Thanks for your help.
0 Kommentare
Akzeptierte Antwort
darova
am 11 Mär. 2020
Try to edit Text Function
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/276626/image.png)
Change precision to 6 or 8 (places fo digits)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!