Thread Subject: Merge bar em plot.

Subject: Merge bar em plot.

From: Henrique Amaral

Date: 5 Aug, 2008 19:04:02

Message: 1 of 2

It's possible merge bars and a error line em the same
figure. I'm trying?

figure;
sem=Averagelat(:,2)./sqrt(Averagelat(:,3));
bar([1:1:7],Averagelat(:,1));%MatLab 7.0
plot([1:1:7],sem,'r');
ylabel('Latency (s)')
xlabel('Frequency Band')
title ('Latency to Oscillation - Ch X')

But it isn't work.

Thanks

Subject: Merge bar em plot.

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 5 Aug, 2008 19:12:23

Message: 2 of 2

In article <g7a872$m2o$1@fred.mathworks.com>,
Henrique Amaral <henriquetomaz@uol.com.br> wrote:
>It's possible merge bars and a error line em the same
>figure. I'm trying?

>figure;
>sem=Averagelat(:,2)./sqrt(Averagelat(:,3));
>bar([1:1:7],Averagelat(:,1));%MatLab 7.0
>plot([1:1:7],sem,'r');
>ylabel('Latency (s)')
>xlabel('Frequency Band')
>title ('Latency to Oscillation - Ch X')

>But it isn't work.

[ax, h1, h2] = plotyy(1:7, Averagelat(:,1), 1:7, sem, 'bar', 'line');
set(h2, 'Color', 'r');


Or you could put a 'hold on' command after the bar() command

--
   "Beware of bugs in the above code; I have only proved it correct,
   not tried it." -- Donald Knuth

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
plot Henrique Amaral 5 Aug, 2008 15:05:11
bar Henrique Amaral 5 Aug, 2008 15:05:11
merge Henrique Amaral 5 Aug, 2008 15:05:11
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com