필터 지우기
필터 지우기

Unwanted marker in logarithmic boxchart

조회 수: 2 (최근 30일)
Behnam
Behnam 2021년 9월 21일
편집: Kevin Holly 2021년 9월 23일
Hello
When I use logarithmic scale for the y-axis of my box plot, a marker appears at the right-bottom corner of the axes. Here's a mininmal code to reproduce the behavior:
x = categorical(1:5);
y = rand(1, 5);
figure;
boxchart(x, y)
set(gca, 'YScale', 'log')
The result is the following:
My question is how to get rid of the unwanted marker.

답변 (1개)

Kevin Holly
Kevin Holly 2021년 9월 21일
Behnam,
The Dev team is currently working on this issue. A workaround for now is to use boxplot instead.
x = 1:5;
y = rand(1, 5);
figure;
boxplot(x, y)
xticklabels({'1','2','3','4','5'})
set(gca, 'YScale', 'log')
  댓글 수: 2
Behnam
Behnam 2021년 9월 21일
편집: Behnam 2021년 9월 21일
Thank you for the answer. I use boxchart because it can conveniently handle data categories. One option for my publishing purpose is to use a vector graphics editior (e.g., Inkscape) to remove the marker. If there is a workaround within MATLAB to remove this marker, that would be much better.
Kevin Holly
Kevin Holly 2021년 9월 23일
편집: Kevin Holly 2021년 9월 23일
Behnam,
Here is a workaround:
x = categorical(1:5);
y = rand(1, 5);
figure;
boxchart(x, y)
set(gca, 'YScale', 'log')
handle = gca;
handle.Children.MarkerStyle = 'none';
Or Alternatively,
boxchart(x, y,'MarkerStyle','none')
set(gca, 'YScale', 'log')

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

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by