## S3 method for class 'landsat':
plot(x, band, which=1, decimate=TRUE, zlim, utm=FALSE,
col=oce.colorsPalette, showBandName=TRUE,
alpha.f=1, red.f=2, green.f=2, blue.f=4,
offset=c(0, 0, 0, 0),
transform=diag(c(red.f, green.f, blue.f, alpha.f)),
debug=getOption("oceDebug"), ...)
landsat
object, e.g. as read by
read.landsat
."aerosol"
, "blue"
, "green"
, "red"
,
"nir"
, "swir1"
, "swir2"
, "panchromatic
imagep
for image plots.
The default yields faster plotting. Some decimation is sensible for
full-size images, since no graphical displays can show 16 thousand pixels
o"histogram"
to have a flattened histogram (i.e. to maximally
increase contrast throughout the domain.) If not given, the 1 and 99
percent quantiles are calc"natural"
, which combines the information in the red
,
green
and blue
TRUE
, the band name is plotted in the top
margin, near the right-hand side.col="natural"
, to adjust colours
with adjustcolor
col="natural"
, to adjust colours with
adjustcolor
. Higher values of red.f
cause red hues
to be emphasized (e.g. dry land).col="natural"
, to adjust colours with
adjustcolor
. Higher values of green.f
emphasize
green hues (e.g. forests).col="natural"
, to adjust colours with
adjustcolor
. Higher values of blue.f
emphasize blue
hues (e.g. ocean).col="natural"
, to adjust colours with
adjustcolor
col="natural"
, to adjust colours
with adjustcolor
x11
, and to set values of
decimate
appropriate to the data and plotting device.
Using zlim="histogram"
is probably the fastest way to explore an
image for detail, but it is important to bear in mind that it yields a
nonlinear colourscale. The histogram plot can be handy in setting scales, e.g. when an image has a
fair bit of land, the histogram will be double-lobed, and so quick
examination can help in setting a good value for zlim
to emphasize
the water or the land. If breaks
is present in ...
then
its value is used in the call to hist
; if not, 100 is used.
Setting band="temperature"
plots an estimate of temperature,
calculated as explained in the documentation for
landsat-class
.
Setting band="terralook"
creates a colour scale that tends to make
the ocean blue and forests green. This uses the USGS ``terralook'' method
(reference 1) of combining the red
, green
and nir
bands, producing new pseudo colors defined as R=red
,
G=2/3*green+1/3*nir
and B=2/3*green-1/3*nir
. For obvious
reasons, this requires that the image contains these three channels. If
band="terralook"
the col
argument is ignored, because an
internal colour scheme is used. Still, this scheme may be altered through
the use of the arguments red.f
, etc.; their action is described in
the documentation for adjustcolor
but users can get good
results just by altering the default values and seeing the results, e.g.
increasing blue.f
makes water bluer.
landsat-class
explains the
structure of landsat objects, and also outlines the other functions dealing
with them. The ocedata
package provides a dataset named
landsat
.library(oce)
library(ocedata)
data(landsat)
plot(landsat, band="temperature")
plot(landsat, which=2, band="temperature", breaks=100)
Run the code above in your browser using DataLab