Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Single Trendline for multiple datasets
Replies: 3   Last Post: Jan 24, 2013 3:03 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 7,885
Registered: 6/7/07
Re: Single Trendline for multiple datasets
Posted: Jan 24, 2013 3:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/24/2013 9:47 AM, dpb wrote:
> On 1/23/2013 4:58 PM, Charlotte wrote:
> ...
>

>> ... - of course 'dpb' makes a good point as
>> after this code, I lose the different colours of the different datasets,
>> but his lsline suggestion didn't work -...

>
> Of course it works... :)
>
> Well, you have to do a few extra steps...try the following to see...
>

> >> y=rand(5); % some random data
...

Actually, if you do the full-data plot correctly, it's not so bad--I
realized I forgot that the x-axis should be repeated for each y vector...

h=plot(repmat([1:5]',5,1),y(:),'*')
lsline
set(h,'color','w') % or set(h,'ydata',[])
hold on
plot(y)

--




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.