I have a tricky question regarding to what i’m trying to do.
I have a plot with two lines (the mean of two conditions) on it. I want to add on the same plot a square reflecting the t-values (and colored according to these values in a gradient way). How could i add this square?
Well since i don’t know if i’m clear, here is a figure of what i try to achieve.
Thank you for any help!

Try this for ggplot2 way:
UPDATED
You can use
scale_fill_XXX. Here is a jet-color version:and in the next version of ggplot2, you can use colorbar as the legend.