- PlotColor by Bruno Luong
- Conditionally Colored Plot (CCPLOT) by Michael Heidingsfeld
- Perceptually improved colormaps by Matteo Niccoli
Getting color in a "timeseries plot"
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
anja pedersen
el 30 de Dic. de 2016
Comentada: per isakson
el 2 de En. de 2017
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 comentarios
Respuesta aceptada
Preethi
el 2 de En. de 2017
hello,
in that case you can use for loop, I tried to provide basic example..
for i=1:length(ts1)
if ts1(i)<criteria_1
plot(ts1,'.','y')
hold on
else
plot(ts1,'.','r')
hold on
end
end
Más respuestas (1)
Preethi
el 30 de Dic. de 2016
hello,
you can append 'r', 'g' ....
plot(ts1,'.r')
or
plot(ts1,'.','Color',[0,0.2,0.8])
Ver también
Categorías
Más información sobre Colormaps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!