[datatable-help] Gradient colours in line graph

riyasmjgeo riyasmjgeo at gmail.com
Sat Feb 4 08:28:44 CET 2017


Hi all,

I am a new user of R. I just did my first real program.
I would like to know how to put a gradient (like rainbow() or topo.colors,
etc) to a* line* graph.

Example:
ar1=array(data=1:10,dim=9)
ar2=array(data=11:20,dim=9)
plot(ar1,ar2,type="l",col="red",lwd=3)

Instead of a red color, I would like to make it in rainbow colors.
Tried to do my own and tried searching but everywhere its about giving
gradient to point graph, not to a line graph. Please help, it is needed for
my work.



--
View this message in context: http://r.789695.n4.nabble.com/Gradient-colours-in-line-graph-tp4728623.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list