Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(lattice)
- library(latticeExtra)
- dat = data.frame(x = 20, y = 0)
- panel_iloveu_cht = function(...){
- panel.xyplot(...)
- panel.curve(-x+6.5, 2.8, 3.5, lwd = 20)
- panel.curve(x+6, 2, 4, lwd = 20)
- panel.curve(x/3+11.5/3, 2, 4.5, lwd = 20)
- panel.curve(0*x+7, 2, 8, lwd = 20)
- panel.lines(c(3.5,3.5),c(3,9.5), lwd = 20)
- panel.curve(0.6*x^2-10.3*x+46.5, 5, 7.5, lwd = 20)
- panel.curve(2*x^2-28.5*x+110, 6.5, 7, lwd = 20)
- panel.curve(0.4*x^2-3.8*x+12, 5, 7.5, lwd = 20)
- panel.curve(3.5*x-23.5, 7.6, 7.7, lwd = 20)
- panel.lines(c(20,20),c(3,9.5), lwd = 20)
- panel.lines(c(22,22),c(8,10.5), lwd = 20)
- panel.curve(0*x+9.5, 22, 26, lwd = 20)
- panel.lines(c(26,26),c(8,9.5), lwd = 20)
- panel.lines(c(24,24),c(3,9.5), lwd = 20)
- panel.curve(x-10.5, 18, 20.5, lwd = 20)
- panel.curve(2*x-38.5, 21.5, 22.5, lwd = 20)
- panel.curve(-2*x+57.5, 25.5, 26.5, lwd = 20)
- panel.curve(-2*x/3+19, 23, 24, lwd = 20)
- panel.curve(5.2+(8*abs(x-13)+15*sqrt(17-(x-13)^2))/17, 7, 19, lwd = 20, col = "red")
- panel.curve(6.1+(8*abs(x-13)-15*sqrt(17-(x-13)^2))/17, 7, 19, lwd = 20, col = "red")
- }
- xyplot(y ~ x, dat, panel = panel_iloveu_cht,
- aspect = 9/26, par.settings = ggplot2like(),
- lattice.options = ggplot2like.opts(),
- xlab = "", ylab = "", xlim = c(1,27), ylim = c(2, 11))
Advertisement
Add Comment
Please, Sign In to add comment