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

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 1:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks for your response, Bruno.

>> We can't see the code that update the text beside first and last iteration.

Actually, the code *isn?t* being updated except at the first & last iterations; the value being displayed will be the same for all intermediate iterations, and I found that if I had updates performed at each intermediate step, it drastically slowed down the running speed of my code, which wasn?t acceptable. So, my intention is simply to display the desired value on the first iteration, and then to delete it on the last iteration.

>> It looks like you mix between text handle and string. What you call txtHandle is actually the string, and you forgot to keep track of the handle.

From the Mathworks documentation ( ), it seems like the following code *should* work:

set(axesHandle, 'Xlim', [-0.7 0.7], 'Ylim', [-0.2 0.7]);

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


However, no text gets displayed to the screen, only the original animation. Is there some other step that I?m missing here?

Given that the code that I showed in my original post *does* display text to the screen, but just doesn?t get deleted properly, does anyone have suggestions about how I might modify the original code shown, so that this text *is* deleted at each final iteration? Thanks!

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-2017. All Rights Reserved.