필터 지우기
필터 지우기

Semi-log stem plot

조회 수: 63 (최근 30일)
Jan
Jan 2013년 6월 13일
Hello, do you know how the hide the horizontal line y=10^0 when using stem plot with log scale on the y axis? Matlab always draws that line as a basis for the stems, but I don't have them displayed, so it is superfluous. Thank you!
stem([1 2 3],[0.1 0.5 10],'linestyle','none')
set(gca,'yscal','log')

채택된 답변

the cyclist
the cyclist 2013년 6월 13일
편집: the cyclist 2013년 6월 13일
figure
h = stem([1 2 3],[0.1 0.5 10],'linestyle','none');
hb = get(h,'Baseline');
set(hb,'Visible','off')
set(gca,'yscal','log')
But, may I ask ...
If you don't want the baseline and stems, then why not just use the plot() command?
plot([1 2 3],[0.1 0.5 10],'o')
  댓글 수: 1
Jan
Jan 2013년 6월 13일
Good question, it seems I believed that "plot" always draws a continuous line, but obviously one can display markers and hide the line. That is much easier. Thank you for pointing that out (and for your solution). Jan

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Stem Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by