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 16:15:11 +0000 (UTC)
Organization: Carnegie Mellon
Lines: 75
Message-ID: <f97hef$63i$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> <f97ee1$4k$1@fred.mathworks.com> <f97fm3$8v0$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 1186416911 6258 172.30.248.35 (6 Aug 2007 16:15:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Aug 2007 16:15:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688548
Xref: news.mathworks.com comp.soft-sys.matlab:422617



Sorry Kathleen,
   I meant to write 'Rotation' and not 'Rotate' . So here is
what I just tried and it worked.
Simple type the below lines on your matlab prompt and check
if it works. If this simple example does not work, then I
think you can assume there is something wrong with your
matlab installation.

figure;
yl = ylabel('My Y label');
set(yl,'Rotation',0); this sets a ylabel horizontally aligned.

----- also try the below on the same figure
tobj = text('String',
'mytextobj','Units','pixels','Position',[20 20]);

This will draw a text object inside the axes. You can rotate
this by -

set(tobj,'Rotation',90);

To put this outside the axes, you can give negative values
to the position x,y co-ordinates.

set(tobj,'Position', [-30,20]) % this sets the label outside
west. 

Try these.

"Kathleen " <quisquiliae2@hotmail.com> wrote in message
<f97fm3$8v0$1@fred.mathworks.com>...
> Thanks for your response, John. When I tried your 
> suggested code, I get the error:
> 
> ??? There is no 'Rotate' property in the 'text' class.
> 
> I'm not sure if your code would allow me to place my axis 
> label *outside* of my axes; I know that I have tried 
> simply using the ylabel() function, but this doesn't 
> display any label. 
> 
>  
> From the Help pages,
> 
> You can rotate axis labels using the Property Editor:
> 
>   1. Start plot editing mode by selecting Edit Plot from 
> the figure Tools menu.
> 
>   2. Display the Property Editor by selecting (left-
> clicking) the axis label you want to rotate. Right-click 
> over the selected text, then choose Properties from the 
> context menu. 
> 
>   3. Click the More Properties button to display the 
> Property Inspector.
> 
>   4. Select the Rotation property text field. A value of 0 
> degrees orients the label in the horizontal position.
> 
>   5. With the left mouse button down on the selected 
> label, drag the text to the desired location and release.
> 
> 
>   In my case, for Step (1) my Tools menu doesn't give me 
> an Edit Plot choice, and when I display the Property 
> Editor, there is no Rotation field... Do you think that 
> this is a bug within my version of Matlab/GUIDE?
> 
>    Any suggestions? Thanks! 
> 
> 
>