Label the scales-plot

조회 수: 3 (최근 30일)
evi
evi 2015년 4월 2일
편집: the cyclist 2015년 4월 2일
Hello!!! I want to plot a graph of a given function in MATLAB..
Is it possible to label the scales in powers of 2?

답변 (1개)

the cyclist
the cyclist 2015년 4월 2일
편집: the cyclist 2015년 4월 2일
figure
plot(2.^(5*rand(1,100)),rand(1,100),'.');
set(gca,'XTick',2.^[0:5])
If you want the labels to be the powers, rather than the numbers themselves, then add the line
set(gca,'XTickLabel',0:5)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by