[初学笔记]matlab的具体类型图形命令函, bar条形图

转自

http://www.cnblogs.com/vanker/p/4245315.html

matlab help document


1 二维图形的函数命令

bar 长条图

scatter 散点图

pie 饼图

errorbar 图形加上误差范围

countour 等高线图

fplot 较精确的函数图形

polar 极座标图

hist 累计图

rose 极座标累计图

stairs 阶梯图

stem 针状图

fill 实心图

feather 羽毛图

Compass 罗盘图

quiver 向量场图



2 条形图 bar

在matlab中 help bar,有更详细的回答

(1) bar graph style

命令函数 barlayout

Y = round(rand(5,3)*10);
figure;

subplot(2,2,1);
bar(Y,'grouped');
title('Group')

subplot(2,2,2);
bar(Y,'stacked');
title('Stack')

subplot(2,2,3);
bar(Y,'histc');
title('Histc')

subplot(2,2,4);
bar(Y,'hist');
title('Hist')




(2)some basic parameters as last blog

line width, line style, facecolor, edgecolor

bar width, bar layout, bar baseline,

c = load('count.dat');
Y = c(1:6,:);
figure
hArray = bar(Y);
set(hArray(2),'LineWidth',2,'EdgeColor','red');



(3) error bar

x = linspace(0,2*pi,30);
y = sin(x);
e = std(y)*ones(size(x));
errorbar(x,y,e)

其中e 就是已知的误差值



(4)set baseline, bar handle

matlab中 help barseries properities


命令函数

bar_handle = bar(randn(10,1));
baseline_handle = get(bar_handle,'BaseLine');
set(baseline_handle,'LineStyle','--','Color','red')




(5) 反向bar图 用 命令函数 barh

即x y 坐标的位置跟上面的相反


(6)三维的条形图

bar3

barh3





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值