From c59c692bcd027615523cae4690fee5295ccb6238 Mon Sep 17 00:00:00 2001 From: Masato setoyama Date: Sat, 5 Jan 2013 18:10:00 +0900 Subject: [PATCH] =?UTF-8?q?ggplot=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chapter5/s1_price_demand.r | 4 ++-- Chapter5/s1_sensitivity_analysis.r | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Chapter5/s1_price_demand.r b/Chapter5/s1_price_demand.r index 1b3e7f1..51d239a 100644 --- a/Chapter5/s1_price_demand.r +++ b/Chapter5/s1_price_demand.r @@ -5,6 +5,6 @@ pdf("price_demand.pdf") ggplot(data = data) + scale_colour_grey(name="Legend", start=0, end=0.6) + geom_line(aes(x = V1, y = V2, color = "price")) + geom_line(aes(x = V1, y = log2(V3)-3, color = "demand")) + - scale_y_continuous("amount") + - scale_x_continuous("time") + scale_y_continuous("amount") + + scale_x_continuous("time") dev.off() \ No newline at end of file diff --git a/Chapter5/s1_sensitivity_analysis.r b/Chapter5/s1_sensitivity_analysis.r index 7bbe645..631d100 100644 --- a/Chapter5/s1_sensitivity_analysis.r +++ b/Chapter5/s1_sensitivity_analysis.r @@ -12,15 +12,15 @@ for(i in c(1:9)) { file_name <- paste("./sa_data/price_demand", i, ".csv", sep="") data <- read.table(file_name, header=F, sep=",") p <- ggplot(data = data) + - scale_colour_grey(name="Legend", start=0, end=0.6) + - geom_line(aes(x = V1, y = V2, color = "price")) + - scale_y_continuous("price") + - scale_x_continuous("time") + - labs(title=paste("cons", 10+i, sep="")) + - theme( - plot.title = element_text(size=10), - legend.position = "none" - ) + scale_colour_grey(name="Legend", start=0, end=0.6) + + geom_line(aes(x = V1, y = V2, color = "price")) + + scale_y_continuous("price") + + scale_x_continuous("time") + + labs(title=paste("cons", 10+i, sep="")) + + theme( + plot.title = element_text(size=10), + legend.position = "none" + ) print(p, vp=vplayout(row, col)) if (col == 3) {row <- row + 1}