How do I graph something simple like http://sapedia.gosaints.org/images/1/13/Consumer_Surplus.gif with no numbers? -- View this message in context: http://r.789695.n4.nabble.com/simple-graph-for-economics-tp4101460p4101460.html Sent from the R help mailing list archive at Nabble.com.
On Nov 23, 2011, at 3:28 PM, avanz wrote:> How do I graph something simple like > http://sapedia.gosaints.org/images/1/13/Consumer_Surplus.gif >?plot ?polygon> .... with no numbers?It may depend on what you mean by that last bit.> -- > View this message in context: http://r.789695.n4.nabble.com/simple-graph-for-economics-tp4101460p4101460.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD West Hartford, CT
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.