How do you set the color palette so that it starts with the darkest color, where older data being lighter than current
问题 I'm plotting a correlation scatter plot, where my data frame has time data and the start year is arbitrary. In this case now I have the following R code ## Set seed for randomness in dummy data: ## set.seed(123) ## Create data frame: ## df.Data <- data.frame(date = seq(as.Date('2019-01-01'), by = '1 day', length.out = 650), DE = rnorm(650, 2, 1), AT = rnorm(650, 5, 2)) corPearson <- cor.test(x = df.Data$DE, y = df.Data$AT, method = "pearson") df.Data$year <- format(as.Date(df.Data$date), '%Y'