24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 2225  |  回复: 5
本帖产生 1 个 博学EPI ,点击这里进行查看

tjbbg18

新虫 (小有名气)

[求助] MATLAB 2016a进度条对象获取和设置问题

ha1=get(hrand,'Children');
hac=get(ha1,'Children');
hapa=findall(hac,'Type','patch')
set(hapa,'FaceColor','k')
这个程序在2014a以前都可设置进度条的颜色,我换成MATLAB2016a之后,
hac=get(ha1,'Children');运行显示 0x0 empty GraphicsPlaceholder array.;
而且set也不能设置颜色了,望指教

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
回帖置顶 ( 共有1个 )

FMStation

至尊木虫 (知名作家)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★
tjbbg18: 金币+10, 博学EPI+1 2016-08-27 18:15:00
https://stackoverflow.com/questions/36352171/change-width-of-the-bar-figure-at-waitbar-matlab-r2015a
CODE:
% Create a progress bar.
hBar = waitbar ( 0, 'Please Wait....' );
% now use java to get to the progress bar
jFrame = get ( hBar, 'JavaFrame' ); % this will throw a warning
jFigPanel = jFrame.getFigurePanelContainer;
% Now go down through the children of the panel to get the container for the progress bar
jContainer = jFigPanel.getComponent(0);
jPanel = jContainer.getComponent(0);
% Change the location of the panel (ref pixels)
jPanel.setLocation(0,40);
% Change the size of the panel
jPanel.setSize(360,18);
% You then need to repaint and validate for the update to be visible.
jContainer.repaint
jContainer.revalidate

6楼2016-08-27 13:51:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通回帖

FMStation

至尊木虫 (知名作家)

【答案】应助回帖

https://www.mathworks.com/help/m ... r-some-objects.html

Why Is the Children Property Empty for Some Objects?
Starting in R2014b, these objects do not contain handles to underlying objects in their Children properties. To customize the graph, use properties of the actual object. This table lists the affected objects.
2楼2016-08-25 22:38:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

tjbbg18

新虫 (小有名气)

引用回帖:
2楼: Originally posted by FMStation at 2016-08-25 22:38:26
https://www.mathworks.com/help/matlab/graphics_transition/why-is-the-children-property-empty-for-some-objects.html

Why Is the Children Property Empty for Some Objects?
Starting in R2014b, these o ...

这个我也查了,我是想知道在2016a中如何设置啊,可否告知
3楼2016-08-26 21:17:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

FMStation

至尊木虫 (知名作家)

【答案】应助回帖

Use colorbar properties to modify the colorbar.
https://www.mathworks.com/help/matlab/ref/colorbar-properties.html
CODE:
c = colorbar;
w = c.LineWidth;
c.LineWidth = 1.5;

4楼2016-08-26 21:32:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

tjbbg18

新虫 (小有名气)

引用回帖:
4楼: Originally posted by FMStation at 2016-08-26 21:32:38
Use colorbar properties to modify the colorbar.
https://www.mathworks.com/help/matlab/ref/colorbar-properties.html


c = colorbar;
w = c.LineWidth;
c.LineWidth = 1.5;

hrand=waitbar(0.3,'颜色')
ha1=get(hrand,'Children');
hac=get(ha1,'Children');
hapa=findall(hac,'Type','patch')
set(hapa,'FaceColor','r')
我还是不懂,就是您能否设置一下进度条的颜色hrand=waitbar(0.3,'颜色'),在2016a中,这个程序在2014a以前都可以把进度条颜色设置为红色,但是2016a中帮助文档说是colorbar但是我还是不会设置进度条啊
5楼2016-08-27 11:11:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 tjbbg18 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿华理,数一英一285求A区调剂 +8 AZMK 2026-03-25 12/600 2026-03-28 18:15 by AZMK
[考研] 321求调剂 +6 璞玉~~ 2026-03-25 7/350 2026-03-28 17:48 by 璞玉~~
[考研] 压国家一区线,求导师收留,有恩必谢! +7 迷人的哈哈 2026-03-28 7/350 2026-03-28 16:47 by 催化大白
[考研] 329求调剂 +6 星野? 2026-03-26 6/300 2026-03-28 14:14 by 唐沐儿
[考研] 322求调剂 +5 旧吢 2026-03-24 5/250 2026-03-28 13:26 by Iveryant
[考研] 311求调剂 +4 冬十三 2026-03-24 4/200 2026-03-28 13:17 by 唐沐儿
[考研] 材料求调剂 一志愿哈工大总分298分,前三科223分 +5 dongfang59 2026-03-27 5/250 2026-03-28 04:53 by wxiongid
[考研] 291求调剂 +7 孅華 2026-03-22 7/350 2026-03-28 04:02 by fmesaito
[考研] 265求调剂 +8 小木虫085600 2026-03-27 8/400 2026-03-27 22:16 by 无际的草原
[考研] 070300化学求调剂 +4 起个名咋这么难 2026-03-27 4/200 2026-03-27 21:39 by 83503孙老师
[考研] 求调剂 +4 零八# 2026-03-27 4/200 2026-03-27 18:07 by yu221
[考研] 327求调剂 +7 prayer13 2026-03-23 7/350 2026-03-26 20:48 by 不吃魚的貓
[考研] 中国科学院深圳先进技术研究院-光纤传感课题组招生-中国科学院大学、深圳理工大学联培 +5 YangTyu1 2026-03-26 5/250 2026-03-26 18:27 by 猫咪猫咪呀
[考研] 085601求调剂总分293英一数二 +4 钢铁大炮 2026-03-24 4/200 2026-03-26 16:28 by dick_runner
[考研] 一志愿 南京邮电大学 288分 材料考研 求调剂 +3 jl0720 2026-03-26 3/150 2026-03-26 13:39 by zzll406
[考研] 化学调剂一志愿上海交通大学336分-本科上海211 +4 小鱼爱有机 2026-03-25 4/200 2026-03-26 10:19 by aa331100
[考研] 一志愿山东大学药学学硕求调剂 +3 开开心心没烦恼 2026-03-23 4/200 2026-03-24 00:06 by 开开心心没烦恼
[考研] 求老师收我 +3 zzh16938784 2026-03-23 3/150 2026-03-23 12:56 by ztnimte
[考研] 280分求调剂 一志愿085802 +4 PUMPT 2026-03-22 7/350 2026-03-22 22:13 by 星空星月
[考研] 石河子大学(211、双一流)硕博研究生长期招生公告 +3 李子目 2026-03-22 3/150 2026-03-22 21:01 by 怎么释怀
信息提示
请填处理意见