semilogy function, and ylabel number

8 Ansichten (letzte 30 Tage)
Modestas Sekreckis
Modestas Sekreckis am 16 Mai 2011
Kommentiert: Image Analyst am 18 Sep. 2014
I am using the function semilogy and I get a graphic with numbers 10^1 10^2... http://img829.imageshack.us/img829/9923/grafikas.jpg I need to graph with the normal numbers For example not 10^2 but that be 100

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 16 Mai 2011
Correcting and optimizing Paulo's answer:
x=0:0.1:10;
s=semilogy(x,10.^x);
set(gca,'YTickLabel',num2str(get(gca,'YTick').'));

Weitere Antworten (2)

Paulo Silva
Paulo Silva am 16 Mai 2011
x=0:0.1:1000;
s=semilogy(x,10.^x);
YTL=get(gca,'YTickLabel');
set(gca,'YTickMode','manual');
set(gca,'YTickLabel',YTL);
  2 Kommentare
Walter Roberson
Walter Roberson am 16 Mai 2011
Ummm, 10 to the 1000 ??
Also, the labels so generated will be merely 0 2 4 6 8 10 rather than 1 100 10000 and so on.
Paulo Silva
Paulo Silva am 17 Mai 2011
thanks Walter, it was a dumb mistake from my part

Melden Sie sich an, um zu kommentieren.


edson ferreira
edson ferreira am 18 Sep. 2014
Thanks Brothers.
Infact I need put in the axis X (0 1 2 3 ......100) not 0 10 20 .... like picture
  1 Kommentar
Image Analyst
Image Analyst am 18 Sep. 2014
Huh? This question is over 3 years old and asked by someone else, and doesn't appear to be related to your question. Maybe read this and post your own, new question.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by