Lin Ma
Lin Ma

Reputation: 10149

add label to filled.contour

Wondering what is the parameter for x-axis and y-axis text label and the main text label? I referred R help (by ? filled.contour), but still confused. Show an example, wondering how to add x-axis and y-axis text label and the main text label in below example. Thanks.

    require(MASS)
    b       <- log10(rgamma(1000,6,3))
    a       <- log10((rweibull(1000,8,2)))
    density <- kde2d(a,b,n=100)
    filled.contour(density,color.palette=colorRampPalette(
                  c('white','blue','yellow','red','darkred')))

regards, Lin

Upvotes: 1

Views: 734

Answers (1)

datahero
datahero

Reputation: 101

As @cuttlefish44 mentioned, the method is the same as plot().

filled.contour(density,color.palette=colorRampPalette(c('white','blue','yellow'‌​
,'red','darkred')), xlab="xlab", ylab="ylab", main="main")

Upvotes: 1

Related Questions