Re: [R] Annotate a levelplot (using abline) - Difficulty with trellis.

From: Dan Bolser <>
Date: Wed 04 Apr 2007 - 14:52:30 GMT

My question was thus;


  my.m <- matrix(seq(1,100,1),nrow=10)

How can I add a diagonal line onto the resulting 'color square'?

The answer I found was to hack the 'panel.levelplot' function. Here is the diff between the old (panel.levplot) and the new (my.panel.levplot) functions;

And then use...

  my.m <- matrix(seq(1,100,1),nrow=10)
  levelplot(my.m, panel=my.panel.levelplot)

I accidentally started to talk to Charilaos Skiadas 'off-list', so thanks to him for help.


        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Apr 05 00:59:57 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Apr 2007 - 15:30:53 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.