Skip to content
Prev 21023 / 29559 Next

Set color key for stplot

Hi Katherine

Yes, it looks like it is lattice plot functions.

I have an example where I wantes to plot the sea as blue and the land according to terrain.colors()

Here is my call to levelplot:

levelplot( Z ~ X + Y, data = xyz, labels = FALSE, aspect = "iso", contour = FALSE,
          cuts = 16, , at = c(-Inf,do.breaks(range(xyz$Z), 15)),
          col.regions = c("#0000FFFF", terrain.colors(15)),
          subset = X > 370000 & X < 380000 & Y > 670000 & Y < 680000)

and a png is attached.

As you can see you need to combine the cuts and col.regions argument to do what you want.



Yours sincerely / Med venlig hilsen


Frede Aakmann T?gersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling

Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog at vestas.com
http://www.vestas.com

Company reg. name: Vestas Wind Systems A/S
This e-mail is subject to our e-mail disclaimer statement.
Please refer to www.vestas.com/legal/notice
If you have received this e-mail in error please contact the sender.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seaANDland.png
Type: image/png
Size: 6981 bytes
Desc: seaANDland.png
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140514/8ce17b12/attachment.png>