Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

displaying number in general format when using loglog plot

Asked by Jetson Ronald on 9 May 2013

Hello

How can I display number in general format (0 1 2 ....) instead of 10^1 when using loglog plot?

Thank You Jetson

0 Comments

Jetson Ronald

Products

No products are associated with this question.

1 Answer

Answer by Tom Lane on 10 May 2013

I don't know if there is a direct way to do this, but the following shows a roundabout way. Just don't make a log plot, but instead plot on the log scale and label the y axes appropriately:

load census
subplot(1,2,1);
semilogy(cdate,pop)
subplot(1,2,2);
plot(cdate,log(pop))
set(gca,'YTick',[log(1),log(10),log(100),log(1000)],...
        'YTickLabel',{'1' '10' '100' '1000'})
ylim([log(1),log(1000)]

0 Comments

Tom Lane

Contact us