Commit 8b51ec02 authored by Franssen, Wietse's avatar Franssen, Wietse
Browse files

Some minor details

parent 05df0569
......@@ -121,7 +121,8 @@ r2ggplotDataStructure <-function(data, timestep = 1) {
#' @export
ggplotje <-function(rdata,lon = NULL, lat = NULL) {
if (!is.na(rdata$Dates$start[1])) {
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,rdata$Dates$start[1], ")")
# title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,rdata$Dates$start[1], ")")
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,as.character(as.Date(data$Dates$start[1])), ")")
} else {
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]")
}
......@@ -143,9 +144,11 @@ ggplotje <-function(rdata,lon = NULL, lat = NULL) {
coord_equal() +
theme_bw() +
xlab(expression(Longitude * ' ' * degree * E * ' ')) +
ylab(expression(Latitude * ' ' * degree * S * ' ')) +
ylab(expression(Latitude * ' ' * degree * N * ' ')) +
theme(legend.title=element_blank())
# xlab(expression(Longitude * ' ' * degree * E * ' ')) +
# ylab(expression(Latitude * ' ' * degree * S * ' ')) +
if (!is.null(lon) && !is.null(lat)) {
zp1 <- zp1 + scale_shape_identity() + geom_point( colour="black", size = 10, aes_string(x = lon, y = lat, shape=3))
......
Supports Markdown
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