How to change the middle line width in barh plot?
1 回表示 (過去 30 日間)
古いコメントを表示
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
2018 年 2 月 12 日
What is ‘the middle line’?
Please give an example of what you want the barh plot to look like.
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!