Commit d7cf973a authored by Graham's avatar Graham

Remove some failing plot layers for now.

parent e25f175c
......@@ -17,6 +17,7 @@ suppressMessages(
{
library(ggplot2)
library(magrittr)
library(tidyr)
})
mlask()
......@@ -37,7 +38,8 @@ nobel$birth_date %>%
as.integer() ->
nobel$birth_year
nobel$award_age <- (nobel$prize_year - nobel$birth_year)
nobel$award_age <- ifelse(is.na(nobel$birth_year), 0,
nobel$prize_year - nobel$birth_year)
nobel$category %<>% ordered(levels = c("Medicine", "Physics", "Chemistry",
"Economics" , "Literature", "Peace"))
......@@ -66,21 +68,21 @@ nobel %>%
theme(plot.caption=element_text(hjust=0, size=9)) +
scale_x_continuous(name= "",
breaks=c(1900, 1925, 1950, 1975, 2000),
labels=c(1900, "", 50, "", 2000),
labels=c(1900, "", 1950, "", 2000),
limits=c (1900, 2025)) +
scale_y_continuous(name="",
breaks=c(25, 50, 75, 100), labels=c(25, 50, 75, 100),
position="right",
25,
limits=c(15, 101)) +
# scale_y_continuous(name="",
# breaks=c(25, 50, 75, 100), labels=c(25, 50, 75, 100),
# position="right",
# 25,
# limits=c(15, 101)) +
theme(panel.grid.major.x=element_blank(),
panel.grid.minor.x=element_blank() ,) +
scale_colour_manual(values=c("#014d64", "#90353B", "#EE6A50",
"#2D6066", "#EE9A00", "#01A209")) +
annotate("text", x=Inf, y=96, label ="Oldest winner \n Leonid Hurwicz, 90", hjust=1, size=2.5,
colour=c ("grey92", "grey92", "grey92", "#2D6066", "grey92", "grey92")) +
annotate("text", x= Inf, y= 25, label = "Youngest winner \n Malala Yousafzai, 17", hjust = 1, size = 2.5,
colour = c ("grey92", "grey92", "grey92", "grey92", "grey92", "#01A209")) ->
"#2D6066", "#EE9A00", "#01A209")) ->
# annotate("text", x=Inf, y=96, label ="Oldest winner \n Leonid Hurwicz, 90", hjust=1, size=2.5,
# colour=c("grey92", "grey92", "grey92", "#2D6066", "grey92", "grey92")) +
# annotate("text", x= Inf, y= 25, label = "Youngest winner \n Malala Yousafzai, 17", hjust = 1, size = 2.5,
# colour = c ("grey92", "grey92", "grey92", "grey92", "grey92", "#01A209"))
plot
suppressWarnings(print(plot))
invisible(dev.off())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment