Skip to main content
fixed image URL
Source Link
rcs
  • 69.1k
  • 24
  • 177
  • 157

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...) panel.text(args$x, args$y, args$y, pos=3, offset=1) panel.barchart(...) }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.pnglattice barchart with labels

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...) panel.text(args$x, args$y, args$y, pos=3, offset=1) panel.barchart(...) }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...) panel.text(args$x, args$y, args$y, pos=3, offset=1) panel.barchart(...) }) print(p) 

lattice barchart with labels

improved code example
Source Link
rcs
  • 69.1k
  • 24
  • 177
  • 157

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...); panel.text(args$x, args$y+2args$y, args$y, pos=3, offset=1); panel.barchart(...) }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...); panel.text(args$x, args$y+2, args$y); panel.barchart(...) }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...) panel.text(args$x, args$y, args$y, pos=3, offset=1) panel.barchart(...) }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

inserted image; added 1 characters in body; added 44 characters in body
Source Link
rcs
  • 69.1k
  • 24
  • 177
  • 157

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120),   panel=function(...) {   args <- list(...);   panel.text(args$x, args$y+2, args$y);   panel.barchart(...)   }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

Create a custom panel function, e.g.

library("lattice") barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120), panel=function(...) { args <- list(...); panel.text(args$x, args$y+2); panel.barchart(...) }) 

Create a custom panel function, e.g.

library("lattice") p <- barchart((1:10)^2~1:10, horiz=FALSE, ylim=c(0,120),   panel=function(...) {   args <- list(...);   panel.text(args$x, args$y+2, args$y);   panel.barchart(...)   }) print(p) 

lattice barchart with labels http://img215.imageshack.us/img215/4818/panelfuncy.png

Source Link
rcs
  • 69.1k
  • 24
  • 177
  • 157
Loading