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: Sun, 4 Jan 2009 23:12:21 -0500
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <gjs1b5$9bn$1@fred.mathworks.com>
References: <gje1jo$4p4$1@fred.mathworks.com> <gjf07v$3kc$1@fred.mathworks.com> <gjf8q9$cfm$1@fred.mathworks.com> <gjlq54$9dp$1@fred.mathworks.com> <gjmp3e$gea$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1231128741 9591 144.212.105.187 (5 Jan 2009 04:12:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 Jan 2009 04:12:21 +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:509800



"Et'o Pat" <patmbom@hotmail.com> wrote in message 
news:gjmp3e$gea$1@fred.mathworks.com...
> Thanks Steve and receives my best wish for the new year.
>
> The problem of scales is overcame  now, but it remains two lasts problems.
>
> First, both bars have the same color. How to select the blue color for 
> example for the first bar, and the red color for the second bar ?

Use the LINESPEC option for BAR or call PLOTYY with three outputs and SET 
the appropriate *Color properties for the second or third handles.

> Second, the  X-axis has undesirable limit, I have tried to resolve this by 
> using the code Xlimit([-1, 31]), unfortunately, without sucess. How to 
> resolve this problem?

You would need to use XLIM (or SET the XLimit property) for both the axes 
whose handles are returned as the first output of PLOTYY in order to change 
the X limits for both the left- and right-hand axes (and to keep them 
synchronized.)  Alternately, linking them (using LINKAXES or LINKPROP) and 
changing one should work.

-- 
Steve Lord
slord@mathworks.com