This project is read-only.

Aesthetics of line plot with 2 time series

Topics: Times Series
Sep 29, 2015 at 4:05 PM
OK, this is probably fairly beginner's question. I use Matlab 2011a with IRIS 20120111 (but have same problem with the latest 2015 IRIS and Matlab 2015a). Assume I want to plot two time series on the same plot and change default aesthetics. For now I have smth like that.

x = tseries(1:10,@rand);
y = tseries(1:10,@rand);
plot([x y],'linewidth',3,'marker','.','linestyle','--');

I assume last line might be:
plot([x y],'linewidth',[3 1],'marker','.','linestyle',['--' '-']);

But that way is not working. How I do such a thing?
Oct 12, 2015 at 12:24 AM
There are a few ways to do it. Not sure about in IRIS 20120111... I would recommend upgrading. But in general you can write
h = plot([x y]) ;
and get either a double which points to the graphics objects or the object itself (depending on whether you are using R2015a or later or not). But either way you can then use the set methods to change the appearance of the lines. E.g.,