Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: textbox help
Posted:
Jan 22, 2012 2:36 PM
|
|
>someone" wrote in message <jfca3c$r59$1@newscl01ah.mathworks.com>... > "Jonathan " <jkakiwi@yahoo.co.uk> wrote in message <jfa2v2$m02$1@newscl01ah.mathworks.com>... > > Hi, > > > > I've developed code to plot a figure with text at specific locations; these locations vary spatially depending on various parameters that are previously selected. What I would like to do is where the text cover lines on the plot, there's a textbox at that location that has a white background color so that the text is clear to see. Is there a way to do this in Matlab. I know wher to place the text but can't figure out how to automatically assign a textbox to that location of a specific size. > > > > Thanks > > Jon > > % You should be able to use the BackgroundColor & EdgeColor > % text propererties to achieve the effects you want. > > doc text > > % and click on the Text Properties link at the bottom of the page. > % Use the format: > > text(x,y,z,'string','PropertyName',PropertyValue....)
Thanks for the help. However, I'm familiar with using text. What I was trying to do was place a textbox at the same location as my text using code. The latter is easy to do since it can be done by code based on xy parameters that can be specified automatically. However, the former is a little trickier since you are dealing with figure coordinates that are different from data coordinates. In the end I figured out way using a nifty tool called plotboxpos, which finds the position of the axes relative to the figure.
|
|
|
|