geom_taylor | R Documentation |
geom_taylor
geom_taylor(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
obs.colour = "black",
obs.size = 5,
show.obs.label = TRUE,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed on to
|
obs.colour |
color of observed point. |
obs.size |
size of observed point. |
show.obs.label |
logical, whether to show the label of observed point. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
library(ggplot2)
library(dplyr)
data = dummy_model %>%
group_by(model, variable) %>%
group_modify(~taylor_data(.$obs, .$mod)) #%>% as.data.table()
print(data)
mar = 0.01
p = ggplot(data) +
geom_taylor(aes2(sd.obs, sd.mod, R, color = model), obs.colour = "black", obs.size = 5) +
# geom_point(aes(color = model), size = 5) +
facet_wrap(~variable) +
labs(color = NULL) +
theme_bw() +
theme(
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
legend.position = c(1, 1) - c(1, 1/3)*mar,
legend.justification = c(1, 1)
)
p
# p = last_plot()
# Ipaper::write_fig(p, "Rplot.pdf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.