MATLAB Answers

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

5 views (last 30 days)
Chris E.
Chris E. on 14 Nov 2015
Answered: Chris E. on 17 Nov 2015
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

Accepted Answer

Walter Roberson
Walter Roberson on 14 Nov 2015
Fill does not accept an axes as its first parameter. Try using
fill(X, Y, C, 'Parent', handles.axis2)
  2 Comments
Walter Roberson
Walter Roberson on 14 Nov 2015
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.

Sign in to comment.

More Answers (1)

Chris E.
Chris E. on 17 Nov 2015
thank you! Works great!

Community Treasure Hunt

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

Start Hunting!

Translated by