fill(ax,X,Y,C) not working???

조회 수: 2 (최근 30일)
Chris E.
Chris E. 2015년 11월 14일
답변: Chris E. 2015년 11월 17일
I have a GUI I made with handles.axis1 and handles.axis2, I'm using the fill functions and find that:
fill(handles.axis2,X,Y,C)
Is not working, it says that there is not enough inputs. But If I use:
fill(X,Y,C)
It will produce the plot on the handles.axis1. I need it to be on handles.axes2 and not on handles.axis1. If anyone knows why it does not except the axis as the first variable in, or if they found a way around it please let me know! Thank you

채택된 답변

Walter Roberson
Walter Roberson 2015년 11월 14일
Fill does not accept an axes as its first parameter. Try using
fill(X, Y, C, 'Parent', handles.axis2)
  댓글 수: 2
Stephen23
Stephen23 2015년 11월 14일
편집: Stephen23 2015년 11월 14일
Although beginners all seem to be allergic to reading the documentation, the fill page actually shows its correct input arguments. So while the title of the question is "fill(ax,X,Y,C) not working", actually it was not being used according to the documentation.
The Documentation: showing how MATLAB works since 1984!
Walter Roberson
Walter Roberson 2015년 11월 14일
Though the fill documentation does not happen to have an example of using the Parent property; knowing about that property requires a bit of experience with the Handle Graphics system that I would not expect people to pick up immediately.

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

추가 답변 (1개)

Chris E.
Chris E. 2015년 11월 17일
thank you! Works great!

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by