Commit a64f210c authored by Graham's avatar Graham

Correct grammar. Add suppression of warnings.

parent fd8235d4
......@@ -7,8 +7,9 @@ library(mlhub)
mlcat("Visualisaing Data Using Faceted Plots",
"A powerful mechanism for exposing the story bewhind some data is through the
use of faceted plots. Such plots are appropriate when there is a natural
partitioning of the data usually through a categoric variables.")
use of faceted plots. A faceted plot repeats a particular plot style but for
different subsets of the data. Such plots are appropriate when there is a
natural partitioning of the data usually through a categoric variable.")
# Load required packages.
......@@ -51,7 +52,7 @@ nobel %>%
ggplot(aes(x=prize_year, y=award_age, color=category)) +
geom_point(shape=1, size=1) +
facet_grid(cols=vars(category)) +
geom_smooth(aes(color=category), se=FALSE, lwd=1.5) +
geom_smooth(aes(color=category), se=FALSE, lwd=1.5, method="loess") +
labs(title='Senescience',
subtitle='Age of Nobel laureates, at date of award',
caption='Source: Nobelprize.org *the economics prize was first awarded in 1969') +
......@@ -79,8 +80,9 @@ nobel %>%
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"))
colour = c ("grey92", "grey92", "grey92", "grey92", "grey92", "#01A209")) ->
plot
suppressWarnings(print(plot))
invisible(dev.off())
mlpreview(fname)
......
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