I have a loglog plot. The yaxis tick marks are labeled very strangely: 10^-1.3 , 10^-1.4 ,etc. How do I change the tick marks from this weird notation to normal decimals?

6 views (last 30 days)
I have a loglog plot. The yaxis tick marks are labeled very strangely: 10^-1.3 , 10^-1.4 ,etc. How do I change the tick marks from this weird notation to normal decimals? I've attached an image of the figure. Note that the y axis tick marks are NOT scientific notation, but rather something else (10^-1.3 = 0.0501).
here's my plot code lines:
figure
loglog(RE,f_m, 'b--o','LineWidth',2);
hold on
loglog(RE,f_plus, 'r--+','LineWidth',1.5);
loglog(RE,f_minus, 'm--*','LineWidth',1.5);
loglog(RE,f_expect, 'k','LineWidth',2);
hold off
grid on
I'm new to asking questions here, so I apologize if I'm not within the normal "rules".
Thanks for any feedback!
  2 Comments
Shawn McCullough
Shawn McCullough on 16 Sep 2017
I am using MATLAB Version: 8.3.0.532 (R2014a) (STUDENT) on Windows 7.
But nevermind! I have answered my own question...
All I had to do was add the following lines to my code:
yticks = get(gca,'YTick');
set(gca,'YTickLabel',yticks);
Not sure why this works, or if it will work in all scenarios, but it worked for me. Sorry to waste your time, but maybe someone else will have this question later some time....
Cheers!

Sign in to comment.

Accepted Answer

Shawn McCullough
Shawn McCullough on 16 Sep 2017
add these lines to the code:
yticks = get(gca,'YTick');
set(gca,'YTickLabel',yticks);

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!