Prev: graph drawing
Next: write ASCII data and append
From: jens on 12 Apr 2010 07:34 Hey Everybody How do I change the color of the two y-axes? I want the color of the y-axes to be respectivily red and blue as the color of the bars. f1 = @(x, y) bar(x, y, 0.4); f2 = @(x, y) bar(x, y, 0.3); [AX,H1,H2]=plotyy(1:5,5:9,1:5,10:14,f1,f2) strings={'Test1' 'Test2' 'Test3' 'Test4' 'Test5'} set(AX,'xticklabel',strings); set(H1,'FaceColor','red'); Best Regards Jens
From: jens on 12 Apr 2010 07:45 "jens " <storebonghoved(a)hotmail.com> wrote in message <hpv0fb$ohk$1(a)fred.mathworks.com>... > Hey Everybody > > How do I change the color of the two y-axes? I want the color of the y-axes to be respectivily red and blue as the color of the bars. > > f1 = @(x, y) bar(x, y, 0.4); > f2 = @(x, y) bar(x, y, 0.3); > [AX,H1,H2]=plotyy(1:5,5:9,1:5,10:14,f1,f2) > strings={'Test1' 'Test2' 'Test3' 'Test4' 'Test5'} > set(AX,'xticklabel',strings); > set(H1,'FaceColor','red'); > > I have solve my problem by using: set(AX(1),'YColor','r') set(AX(2),'YColor','b') Best Regards Jens > Best Regards > > Jens
From: jens on 12 Apr 2010 08:05 "jens " <storebonghoved(a)hotmail.com> wrote in message <hpv14g$4kk$1(a)fred.mathworks.com>... > "jens " <storebonghoved(a)hotmail.com> wrote in message <hpv0fb$ohk$1(a)fred.mathworks.com>... > > Hey Everybody > > > > How do I change the color of the two y-axes? I want the color of the y-axes to be respectivily red and blue as the color of the bars. > > > > f1 = @(x, y) bar(x, y, 0.4); > > f2 = @(x, y) bar(x, y, 0.3); > > [AX,H1,H2]=plotyy(1:5,5:9,1:5,10:14,f1,f2) > > strings={'Test1' 'Test2' 'Test3' 'Test4' 'Test5'} > > set(AX,'xticklabel',strings); > > set(H1,'FaceColor','red'); > > > > > I have solve my problem by using: > > set(AX(1),'YColor','r') > set(AX(2),'YColor','b') > > Best Regards > > Jens > > Best Regards > > > > Jens Hey again I have run into another problem. When I use the xticklabel function how do I delete the original horizontal xlabels soo it is only the vertical xlabel that are shown? I tried: f1 = @(x, y) bar(x, y, 0.4); f2 = @(x, y) bar(x, y, 0.3); [AX,H1,H2]=plotyy(1:5,3:7,1:5,10:14,f1,f2) strings={'Test1' 'Test2' 'Test3' 'Test4' 'Test5'} set(H1,'FaceColor','red'); legend([H1, H2], 'bongo','billy') set(AX(1),'YColor','r') set(AX(2),'YColor','b') set(AX,'xticklabel',strings); xl=xlim; get(AX,'xtick'); xticknew=(1:1:length(strings)); set(AX,'xtick',xticknew); xticklabel_rotate([],90,[],'fontsize',14); ylim(AX(1), [0 8]); ylim(AX(2), [0 15]); Best Regards Jens
|
Pages: 1 Prev: graph drawing Next: write ASCII data and append |