> I'm trying to draw a 2D plot using multiple tints of red. The
> (simplified) setup is the following: || year | x | y ||
> My idea is that each year is plotted with a different tint of red.
> Older year (lightest) -> Later year (darkest). I've managed to plot
> this with different scales of grays simply by doing:
There have been other replies using rgb and hsv colour spaces directly,
but the new colorRamp and colorRampPalette functions iare worth mentioning
because they pack those solutions into a general framework:
years <- 1:20
plot(years, pch=19, col=grey(length(years):0/length(years)))
for a touch more tomato (subjectively) in the red.
> before the plot and for each year the color used is a different tint of gray.
> So, is there any way to do this for any color?
> Any tip or advice?
> With this, I hope to visualize patterns in my dataset more easily.
> Thanks in advance for any help.
> Best regards,
> Sérgio Nunes
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]