Register to reply

MATLAB removing text

by quantum13
Tags: matlab, removing, text
Share this thread:
quantum13
#1
Oct14-10, 02:10 PM
P: 66
i'm using basic graphics on matlab where i use

text(x,y,'text as string')

to display text on a plot. is there a way to REMOVE this text? I tried overwriting it with ' ' and making the color white, font size 0, but none of these will remove the text.
Phys.Org News Partner Science news on Phys.org
Mysterious source of ozone-depleting chemical baffles NASA
Water leads to chemical that gunks up biofuels production
How lizards regenerate their tails: Researchers discover genetic 'recipe'
MATLABdude
#2
Oct14-10, 03:03 PM
Sci Advisor
P: 1,724
If you use the following:
>> h1 = text(x,y,'text as string')

h1 will be an object handle to the text you just placed on your graph, allowing you to manipulate its properties, move it around, etc. You should also be able to delete it using the delete method:
>> delete(h1)

More documentation at the Mathworks website:
http://www.mathworks.com/help/techdoc/ref/delete.html
http://www.mathworks.com/help/techdoc/ref/text.html

I seem to recall that this should work, but don't have a copy of MATLAB at my work station.
quantum13
#3
Oct14-10, 09:13 PM
P: 66
perfect solution, thanks


Register to reply

Related Discussions
How to create a verctor in matlab using data recorded in a text document? Math & Science Software 1
Matlab GUI: changing multiple lines static text Math & Science Software 1
Matlab GUI: putting several edit text inputs in one matrix Math & Science Software 4
MATLAB help - searching text for specific words Math & Science Software 0
Matlab: How to plot 'text' Math & Science Software 1