The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Problem with clearing text from axes
Replies: 7   Last Post: Jan 15, 2013 3:44 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Kate J.

Posts: 177
Registered: 6/9/11
Re: Problem with clearing text from axes
Posted: Jan 14, 2013 9:34 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks for your response, Bruno.

>> (10,10) is outside the axe limits, therefore I'm not surprises you won't see anything displayed.

Thanks for the tip. Using smaller values allows the following lines to display when it's located within my Start() function:

TaskNumHandle = text(0.3,0.6,'Task # = 1');
set(TaskNumHandle, 'Color','k', 'FontWeight','bold');


>> You should also enforce the axes by calling:
>> text(..., 'Parent', axesHandle)

However, if I add this line to the Start() function:

text(0.3,0.6,'Task # = 1', 'Parent', axesHandle);

... it causes the "Task # = 1" line to be overwritten over itself, so that every character becomes dark by the final iteration, which is not what I want. If there is no important reason why the above line *needs* to be included, I would prefer to omit it...


The big problem is that if I try to include the following code within my Update() function:

if(iteration == 0)
TaskNumHandle = text(0.3,0.6,'Task # = d', taskNumber);
set(TaskNumHandle, 'Color','k', 'FontWeight','bold');

if(iteration == endCondition)

... the code won't even run, and returns the errors:

~ Error evaluating registered method 'Update'...

~ Invalid parameter/value pair arguments

I don't understand why this code would run without problems within the Start() function, but then cause an error within Update()... I commented-out the 2nd part of the code above, and it still returns the same errors.

Any ideas about what might be wrong? Thanks for your help.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.