Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(lattice)
- library(latticeExtra)
- dat = data.frame(x = 4, y = -2)
- panel_iloveu = function(...){
- panel.xyplot(...)
- panel.curve(3+sqrt(1-(x+1)^2), -2, 0, lwd = 2)
- panel.curve(3-sqrt(1-(x+1)^2), -2, 0, lwd = 2)
- panel.curve(-2*x+6, 1, 2, lwd = 2)
- panel.curve(2*x-2, 2, 3, lwd = 2)
- panel.curve(3+sqrt(1-(x-5)^2), 4, 6, lwd = 2)
- panel.curve(3-sqrt(1-(x-5)^2), 4, 5.6, lwd = 2)
- panel.curve(-2*x-8, -4, -3, lwd = 2)
- panel.curve(2*x+4, -4, -2, lwd = 2)
- panel.curve(-1+sqrt(1-x^2), -1, 1, lwd = 2)
- panel.curve(-1-sqrt(1-x^2), -1, 1, lwd = 2)
- panel.curve(8/9*x^2-44/9*x+85/18, 2, 3.5, lwd = 2)
- panel.curve(0*x+6, -7, -5, lwd = 2)
- panel.curve(0*x+2, -7, -5, lwd = 2)
- panel.curve(0*x+3, 4, 6, lwd = 2)
- panel.lines(c(-3,-3),c(2,6), lwd = 2)
- panel.lines(c(-6,-6),c(2,6), lwd = 2)
- panel.lines(c(2,2),c(-1.5,0), lwd = 2)
- panel.lines(c(3.5,3.5),c(-2,0), lwd = 2)
- }
- xyplot(y ~ x, dat, panel = panel_iloveu,
- aspect = 1/1.6, par.settings = ggplot2like(),
- lattice.options = ggplot2like.opts(),
- xlab = "", ylab = "", xlim = c(-8,8), ylim = c(-4, 6))
Advertisement
Add Comment
Please, Sign In to add comment