Thiago, This will not be simple using filled.contour, as this changes the layout from the figure. You might try the function image2D from plot3D:
require(plot3D) par(mfrow = c(2, 1)) par(mar = c(0, 4, 4, 2)) plot(0, axes = FALSE, frame.plot = TRUE) # upper plot par(mar = c(4, 4, 0, 2)) Col <- ramp.col(c("blue", "red")) image2D(z = volcano, col = Col, xlab = "", contour = TRUE, colkey = list(side = 1, length = 0.5)) Hope it helps, Karline Soetaert >Original Message: 1 >Date: Wed, 17 Sep 2014 01:53:05 -0700 >From: "Thiago V. dos Santos" <thi_vel...@yahoo.com.br> >To: "r-help@r-project.org" <r-help@r-project.org> >Subject: [R] Control color palette and legend in filled.contour >Message-ID: > <1410943985.1852.yahoomail...@web121903.mail.ne1.yahoo.com> >Content-Type: text/plain; charset="UTF-8" >>Dear all, >I am having some difficulties trying to control color palette and legend of a >filled.countour plot. > >Basically, I am plotting volumetric soil moisture which ranges from 0 to 1 >(although the data excerpt I'm providing here ranges from 0 to 0.4, my >complete dataset ranges from 0 to 1). Low values mean dry soil and higher >values denote wet soil. > >Instead of the default color palette, I would like to set a 'red to blue' >palette with legend ranging from 0 (red) to 1 (blue). My final goal is to >achive a color palette and legend similar to this figure: >https://imageshack.com/i/exmVz5QSp. > >A sample of my data (as well as an attemptive plot) can be reproduced with >this code: >.... >>>> ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.