Am I using xtickformat incorrectly?

Am I using xtickformat incorrectly?

tomherbig
Participant Participant
408 Views
5 Replies
Message 1 of 6

Am I using xtickformat incorrectly?

tomherbig
Participant
Participant

I am trying to refine the x-axis labels in my graphs using the xtickformat command but something isn't working as expected.

 

For 2 digits after the decimal point, all is fine. I use 

 

xtickformat('$%.2f');

 

which results in these correct axis labels:

 

Cents example - cropped.png

 

For 3 digits after the decimal point, things are no longer as they should be. The command

 

xtickformat('$%.3f');

 

 now results in the following unwanted exponential notation in the axis labels:

 

 

Tenth of cents example - cropped.png

 
However, fprintf with the same format specification still gives the expected result:
 

 

fprintf("$%.3f\r", 0.001)

 

$0.001

 

Am I using xtickformat incorrectly or is this a bug?

 

Thanks,

Tom

0 Likes
Accepted solutions (2)
409 Views
5 Replies
Replies (5)
Message 2 of 6

g-andresen
Consultant
Consultant
Accepted solution

Hi,

Are you sure you are in the right forum?

 

günther

0 Likes
Message 3 of 6

tomherbig
Participant
Participant

Hi Günther,

 

No, I'm not sure. I haven't used the fora very much and don't really know what goes where. Would you have a suggestion as to where to post this instead?

 

Thanks,

Tom

 

0 Likes
Message 4 of 6

g-andresen
Consultant
Consultant
Accepted solution

Hi,

I can't imagine in which function of Fusion 360 (CAD software) your request could occur.

 

günther

0 Likes
Message 5 of 6

tomherbig
Participant
Participant

OK, that's very embarrassing! I had a problem with Matlab and mistakenly went to a Fusion 360 - probably because that was the open tab.

 

Thanks for being gentle with me 🙂

 

Tom

 

0 Likes
Message 6 of 6

g-andresen
Consultant
Consultant

Hi,


@tomherbig  schrieb:

OK, that's very embarrassing!

 


Who has not experienced something like this?
I wish you a good solution.

 

günther

0 Likes