Skip to content

Commit

Permalink
ggplotのコードのインデントを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
setoyama60jp committed Jan 5, 2013
1 parent 42bc0d2 commit c59c692
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Chapter5/s1_price_demand.r
Expand Up @@ -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()
18 changes: 9 additions & 9 deletions Chapter5/s1_sensitivity_analysis.r
Expand Up @@ -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}
Expand Down

0 comments on commit c59c692

Please sign in to comment.