R Plotting two datasets with smoothScatter() with

2019-08-01 06:52发布

问题:

I would like to plot the two dimensional densities of two different datasets using the smoothScatter() function:

smoothScatter(confdiffCovCorrect$meth.diff, confdiffCovCorrect$qvalue)
smoothScatter(logdiffCovCorrect$meth.diff, logdiffCovCorrect$qvalue)`

But, in order to compare the two datasets using the plots, I want the color code to be identical. That is, I want a given value Xi of the density function to correspond to the same color in both plots.

Is this possible?