Matlab 饼状图h0=figure('toolbar','none',...'position',[200 150
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/08/15 11:42:03
Matlab
饼状图
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','实例09');
t=[54 21 35;
68 54 35;
45 25 12;
48 68 45;
68 54 69];
x=sum(t);
h=pie(x);
textobjs=findobj(h,'type','text');
str1=get(textobjs,{'string'});
val1=get(textobjs,{'extent'});
oldext=cat(1,val1{:});
names={'商品一:';'商品二:';'商品三:'};
str2=strcat(names,str1);
set(textobjs,{'string'},str2)
val2=get(textobjs,{'extent'});
newext=cat(1,val2{:});
offset=sign(oldext(:,1)).*(newext(:,3)-oldext(:,3))/2;
pos=get(textobjs,{'position'});
textpos=cat(1,pos{:});
textpos(:,1)=textpos(:,1)+offset;
set(textobjs,{'position'},num2cell(textpos,[3,2]))
饼状图
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','实例09');
t=[54 21 35;
68 54 35;
45 25 12;
48 68 45;
68 54 69];
x=sum(t);
h=pie(x);
textobjs=findobj(h,'type','text');
str1=get(textobjs,{'string'});
val1=get(textobjs,{'extent'});
oldext=cat(1,val1{:});
names={'商品一:';'商品二:';'商品三:'};
str2=strcat(names,str1);
set(textobjs,{'string'},str2)
val2=get(textobjs,{'extent'});
newext=cat(1,val2{:});
offset=sign(oldext(:,1)).*(newext(:,3)-oldext(:,3))/2;
pos=get(textobjs,{'position'});
textpos=cat(1,pos{:});
textpos(:,1)=textpos(:,1)+offset;
set(textobjs,{'position'},num2cell(textpos,[3,2]))
![Matlab 饼状图h0=figure('toolbar','none',...'position',[200 150](/uploads/image/z/2488701-21-1.jpg?t=Matlab+%E9%A5%BC%E7%8A%B6%E5%9B%BEh0%3Dfigure%28%27toolbar%27%2C%27none%27%2C...%27position%27%2C%5B200+150)
set get是设定和获得参数值的函数
其他大部分为初等函数,可以查一查理解下程序
其他大部分为初等函数,可以查一查理解下程序
Matlab 饼状图h0=figure('toolbar','none',...'position',[200 150
matlab中这个语句h=figure('position',[350 275 400 300],'color','w'
matlab figure是什么用途
matlab中figure是什么意思
英语翻译function clk% clf;shg;h=figure('menubar','none',...'colo
MATLAB怎么做两个figure?
figure('position',[ 0 0 imageSize(2) imageSize(1) ]);
matlab figure(1),figure(2)在哪个位置添加?
matlab 错误,function z=Shubert(x1,x2) %Shubert函数figure(1);x1=-
matlab中figure坐标范围如何调节?
matlab中figure坐标范围如何调节
关于matlab中figure的问题