Message-ID: <e012f203-ae4c-8db4-0efb-5e4a743f2b6c@gmx.net>
Date: 2016-12-15T09:22:34Z
From: Dagmar
Subject: ggplot aestetics: beginner question - I am lost in endless possibilites
# Dear all,
# I hope someone can help me with this. I am so lost and can't find a
solution even though I spent hours on searching for a solution of that
tiny problem.
# Maybe someone of you could give me hint?
#This is my string:
exdatframe <- data.frame(Name=c("Ernie","Ernie","Ernie",
"Leon","Leon","Leon"),
recordedTime=c("03.01.2011","04.01.2011","05.01.2011",
"04.01.2011","05.01.2011","06.01.2011"),
knownstate =c("breeding","moulting","moulting",
"breeding","breeding",NA))
exdatframe
exdatframeT <- as.POSIXct
(strptime(as.character(exdatframe$recordedTime),"%d.%m.%Y"))
exdatframeT
exdatframe2 <- cbind(exdatframe, exdatframeT)
exdatframe2$recordedTime <-NULL
exdatframe2
str(datframe)
library(ggplot2)
ggplot(exdatframe2)+geom_tile(aes(x=exdatframeT,y=Name,fill=knownstate),
height=0.5)
# Now all I want is:
# 1) a black outline around the bars. Adding colour="black" like I have
found elsewere on the internet doesn't work
# 2) change the colours: E.g. I want white for NAs. I can't find a
command to describe my wishes.
#?