필터 지우기
필터 지우기

How to change the middle line width in barh plot?

조회 수: 1 (최근 30일)
Bruno
Bruno 2018년 2월 12일
답변: KL 2018년 2월 12일
Hi,
I tried to change the middle line width in barh plot
using set(gca,'linewidth',3), this modifies the x and y-axis.
Any and all help is much appreciated!
figure
Y1 = 1:4;
Y2 = 5:8;
data = rand(4);
barh(Y1,(abs(data(:,1))),'r');
hold on
barh(Y2,(abs(data(:,2))),'g');
hold on
barh(Y1,(-(abs(data(:,3)))),'r')
hold on
barh(Y2,(-(abs(data(:,4)))),'g')
set(gca,'linewidth',3)
box off
  댓글 수: 2
Star Strider
Star Strider 2018년 2월 12일
What is ‘the middle line’?
Please give an example of what you want the barh plot to look like.
Bruno
Bruno 2018년 2월 12일
Hi, I want to increase the width of the middle line in the barh plot

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

채택된 답변

KL
KL 2018년 2월 12일
You don't need to change the axis line thickness but simply plot a vertical line like,
plot([0 0],[0 10],'k','linewidth',3)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by