How can I change the bar style in a errorbar plot?

조회 수: 4 (최근 30일)
Kevin Dupraz
Kevin Dupraz 2015년 5월 12일
댓글: Star Strider 2015년 11월 26일
Hi, I have a problem when I update my Matlab version from 2012b to 2014b. The problem is when I plotted any figure in Matlab 2012b I can access to any object and modify it. For now under Matlab 2014b I cannot access these objects. This is a global problem for Matlab 2014b, so I focus on a specific one:
How can I now modify the bars of the errorbar plot in order to get dashed errorbar style under Matlab 2014b. This is my code under Matlab 2012b:
hline = errorbar(x,y,L,U,'r','LineStyle','none');
hline = get(hline,'Children');
set(hline(2),'LineStyle','--');
best regards,
Kevin

채택된 답변

Star Strider
Star Strider 2015년 5월 12일
In HG2 (in R2014b+), 'Chlidren' no longer exist.
This will work:
hline = errorbar(x,y,L,U,'r','LineStyle','none');
set(hline,'LineStyle','--');
as will this:
hline = errorbar(x,y,L,U,'r','LineStyle','none');
hline.LineStyle = '--';
  댓글 수: 4
Kevin Dupraz
Kevin Dupraz 2015년 11월 26일
Ok great this makes the job partially but it is sad that the functionality was removed.
Star Strider
Star Strider 2015년 11월 26일
I agree. I believe functionality that was easy in HG1 is being gradually restored to HG2, and some new necessary functionality is being added, but it is taking time.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by