f



Plotyy changing left and right y axis tick mark fonts

Hi!
I've been trying to change tick mark number fonts of a plotyy graph.
using 

[AX,H1,H2] = plotyy(ang_t,ang_,temp_t,temp_,'plot');
h = legend('Angle','Temp','C: Y w/ heater',2);
set(h,'Interpreter','none','fontsize',16)
set(get(AX(1),'Ylabel'),'String','Angle [\circ]','fontsize',16,'fontweight','b') 
set(get(AX(2),'Ylabel'),'String','Temp [\circC]','fontsize',16,'fontweight','b') 
ax1 = gca;
set(ax1,'fontsize',16)

I was able to get only left hand y axis and x axis to change font sizes but not the right hand y-axis tick mark fonts (ylabel for both sides worked though)

Any help will be much appreciated
0
mecmec
6/18/2010 1:51:05 PM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

3 Replies
2225 Views

Similar Articles

[PageSpeed] 22

mecmec wrote:
> Hi!
> I've been trying to change tick mark number fonts of a plotyy graph.
> using
> [AX,H1,H2] = plotyy(ang_t,ang_,temp_t,temp_,'plot');
....

> ax1 = gca;
> set(ax1,'fontsize',16)

....

That's current axis...

set(ax(1),'fontsize',12)
set(ax(2),'fontsize',8)


worked just fine here...

--
0
dpb
6/18/2010 2:00:52 PM
"mecmec " <brazilwax4u@yahoo.com> wrote in message 
news:hvftk9$be3$1@fred.mathworks.com...
> Hi!
> I've been trying to change tick mark number fonts of a plotyy graph.
> using
> [AX,H1,H2] = plotyy(ang_t,ang_,temp_t,temp_,'plot');
> h = legend('Angle','Temp','C: Y w/ heater',2);
> set(h,'Interpreter','none','fontsize',16)
> set(get(AX(1),'Ylabel'),'String','Angle 
> [\circ]','fontsize',16,'fontweight','b') 
> set(get(AX(2),'Ylabel'),'String','Temp 
> [\circC]','fontsize',16,'fontweight','b') ax1 = gca;

Don't use GCA here.  PLOTYY creates _two_ axes and only one can be the 
Current Axes that you Get with GCA.  Instead, simply use the vector of 
handles you already have:

set(AX, 'FontSize', 16)

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com 


0
slord (13689)
6/18/2010 2:07:08 PM
"Steven Lord" <slord@mathworks.com> wrote in message <hvfuib$bvm$1@fred.mathworks.com>...
> 
> "mecmec " <brazilwax4u@yahoo.com> wrote in message 
> news:hvftk9$be3$1@fred.mathworks.com...
> > Hi!
> > I've been trying to change tick mark number fonts of a plotyy graph.
> > using
> > [AX,H1,H2] = plotyy(ang_t,ang_,temp_t,temp_,'plot');
> > h = legend('Angle','Temp','C: Y w/ heater',2);
> > set(h,'Interpreter','none','fontsize',16)
> > set(get(AX(1),'Ylabel'),'String','Angle 
> > [\circ]','fontsize',16,'fontweight','b') 
> > set(get(AX(2),'Ylabel'),'String','Temp 
> > [\circC]','fontsize',16,'fontweight','b') ax1 = gca;
> 
> Don't use GCA here.  PLOTYY creates _two_ axes and only one can be the 
> Current Axes that you Get with GCA.  Instead, simply use the vector of 
> handles you already have:
> 
> set(AX, 'FontSize', 16)
> 
> -- 
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on 
> http://www.mathworks.com 
> 



THANK YOU ALL!!!!
0
6/18/2010 2:27:22 PM
Reply: