Path: news.mathworks.com!not-for-mail
From: "John " <sjohn@cnbc.cmu.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem with rotating GUI components
Date: Mon, 6 Aug 2007 15:23:45 +0000 (UTC)
Organization: Carnegie Mellon
Lines: 47
Message-ID: <f97ee1$4k$1@fred.mathworks.com>
References: <f82e7i$joh$1@fred.mathworks.com> <f854tv$rst$1@fred.mathworks.com> <f856tk$3dl$1@fred.mathworks.com> <f857vq$m46$1@fred.mathworks.com> <f97bnq$aek$1@fred.mathworks.com>
Reply-To: "John " <sjohn@cnbc.cmu.edu>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1186413825 148 172.30.248.35 (6 Aug 2007 15:23:45 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Aug 2007 15:23:45 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688548
Xref: news.mathworks.com comp.soft-sys.matlab:422613


Kathleen,
   If you need to rotate text annotation objects, you should
be able to do it with 'Rotate' property of text. I dont know
how you could not find that property in the property editor
if you are indeed using 'text' object. Probably you are
using text box, by selecting 'Text box' from the insert menu.
   Try this. When you have your figure visible, type 
p = text(X,Y,'YourString');% here X, Y should be position
vector. This returns the text object's handle in p.

Now you can use rotate property on p, like this -

set(p,'Rotate',90);

Check for the properties of text in doc text.

Hope this helps.




"Kathleen " <quisquiliae2@hotmail.com> wrote in message
<f97bnq$aek$1@fred.mathworks.com>...
> This is still not working; for each of the following 
> statements, I get the error message shown:
> 
>  rotate(handles.YAxisLabel, [1 0 0], 90);
>  error: ??? Error: H must contain axes children only.
> 
> 
>  rotate(YAxisLabel, [1 0 0], 90);
>  error: ??? Undefined function or variable 'YAxisLabel'.
> 
> 
>  within the object's Create Function callback,
>  rotate(hObject, [1 0 0], 90);
>  error:??? H must contain axes children only.
> 
> 
> The first argument of rotate( ) is supposed to be 
> a "graphics object". How can I refer to my static text 
> object in order to rotate it? Thanks for your input!  
>     Kathleen
> 
> 
>