Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: bar same X-axis two Y axis
Date: Fri, 2 Jan 2009 14:32:52 -0500
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <gjlq54$9dp$1@fred.mathworks.com>
References: <gje1jo$4p4$1@fred.mathworks.com> <gjf07v$3kc$1@fred.mathworks.com> <gjf8q9$cfm$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1230924772 9657 144.212.105.187 (2 Jan 2009 19:32:52 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 2 Jan 2009 19:32:52 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:509550



"Et'o Pat" <patmbom@hotmail.com> wrote in message 
news:gjf8q9$cfm$1@fred.mathworks.com...
>I have used this syntax,
> plotyy(x1, s, per,z, @bar, @bar),
>
> but an other problem occurs:  both bars overlaped.  How two separate them 
> ?

Your message said, in part:

"Can you help me to draw a multi-bar with the same X-axis and two-Y axis "

If x1 and per overlap, so will the bars they plot (because they will be 
using the same X axis.)  You may want to write the calls to BAR as anonymous 
functions, and specify the width parameter to make the bars narrower.

f1 = @(x, y) bar(x, y, 0.4);
f2 = @(x, y) bar(x, y, 0.3); % even narrower
plotyy(x1, s, per, z, f1, f2);

*snip the rest*

-- 
Steve Lord
slord@mathworks.com