[R] simple graph for economics
Jess L
tszhenzhenj at hotmail.com
Thu Nov 24 05:02:12 CET 2011
hi,
you may want to try the following, see whether you want this:
plot(NULL, xlim = c(0, 10), ylim = c(0, 8), xaxt = "n", yaxt = "n",
main = "The Demand Curve", xlab = "", ylab = "", bty = "n")
lines(x = c(1, 8), y = c(1, 1))
lines(x = c(1, 1), y = c(1, 8))
lines(x = c(1, 7), y = c(7, 1))
lines(x = c(1, 4), y = c(4, 4))
polygon(x = c(1, 1, 4), y = c(7, 4, 4), col = "green4")
arrows(x0 = 4, y0 = 5.8, x1 = 2, y1 = 4.6, length = 0.1)
text(x = 0.5, y = 7, "Price", cex = 0.6)
text(x = 0.2, y = 4, "Market Price", cex = 0.6)
text(x = 8, y = 0.5, "Quantity", cex = 0.6)
text(x = 4, y = 6, "Consumer Surplus", cex = 0.6)
Cheers,
JL
--
View this message in context: http://r.789695.n4.nabble.com/simple-graph-for-economics-tp4101460p4102682.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list