I am using ggplot to generate graph by reading the data from excel file. In Excel file there are some Greek Letters, like Theta. So, when I draw the graph, every things are working fine and as expected, except that Greek Letter which is replaced by ? symbol in legend.
The below is my ggplot code.
km = read.csv("LN3T0_Zab_ZabCTALL.csv",T)
km <- transform(km, Protocols= reorder(Protocols, order(Order, decreasing = F)))
plot1 <- ggplot(data=km , aes(x=Write.Ratio, y=Latency, group=Protocols, colour = Protocols, shape=Protocols)) +
geom_errorbar(aes(ymin=Latency-Error, ymax=Latency+Error), width=2.0, colour="black") +
geom_line(size=1.2) +
geom_point(size=3.2)
plot1 <- plot1 + scale_y_continuous(breaks= seq(0,80,10), limits = c(0,80)) +
labs(x="Write Ratio") +
scale_x_continuous(breaks = c(10,20,30,40,50,60,70,80,90,100)) +
labs(y="Latency (ms)")
plot1 <- plot1 + scale_colour_manual(values=c("#00ff00","#0000ff","#00ffff","#bf00ff","#ff00bf"))
plot1 <- plot1 + theme_bw() +
theme(legend.position="bottom") +
labs(fill="", colour=" ", shape=" ") +
theme(text = element_text(size=18)) +
guides(fill = guide_legend(keywidth = 0.8, keyheight = 0.01))+
scale_shape_manual(values=c(16, 15, 18, 19, 20))
plot1
How to show the Greek letters (that is written in Excel file) in graph that is generated using ggplot?
Any help?