Getting color in a "timeseries plot"
显示 更早的评论
Hi, I am plotting a timeseries using a function like this "ts1 = timeseries(DD1,1:length(DD1))" I manage to plot "plot(ts1,'.') and it looks nice. However I would like to get color into the graph based on a second vector. Is this possible? I know "scatter" has this function but it does not work on my ts data..
What i want is date on x-axis, Wind direction on y-axis and Wind speed displayed as color. Can anyone help me please?
3 个评论
per isakson
2017-1-2
编辑:per isakson
2017-1-2
Not directly out of the box, but search the File Exchange
- PlotColor by Bruno Luong
- Conditionally Colored Plot (CCPLOT) by Michael Heidingsfeld
- Perceptually improved colormaps by Matteo Niccoli
and there are more - I guess
Image Analyst
2017-1-2
Please correct the first link.
per isakson
2017-1-2
Fixed it. Thanks!
采纳的回答
更多回答(1 个)
Preethi
2016-12-30
hello,
you can append 'r', 'g' ....
plot(ts1,'.r')
or
plot(ts1,'.','Color',[0,0.2,0.8])
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!