I've produced a circular plot using the data below:
Var1 Var2 Freq
1 not specified bath 4
2 not specified current 20
3 MODIS DSL 1
4 not specified DSL 1
5 SeaWiFS DSL 1
6 not specified front 2
7 SeaWiFS front 2
8 not specified img 1
9 not specified O2 1
10 AVHRR ocn prod 3
11 IRS-P4 OCM ocn prod 1
12 MERIS ocn prod 1
13 MODIS ocn prod 17
14 not specified ocn prod 12
15 OCI ocn prod 1
16 SeaWiFS ocn prod 20
17 MODIS salinity 1
18 not specified salinity 1
19 not specified SSH 35
20 AMSR-E SST 4
21 AVHRR SST 38
22 CZCS SST 1
23 Imager SST 3
24 MODIS SST 18
25 not specified SST 23
26 SeaWiFS SST 1
27 AVHRR vessel 1
28 not specified vessel 1
29 not specified wind 3
30 SeaWinds wind 1
Using this code;
circ.plot = ggplot(var.sens, aes(x=as.factor(id), y=Freq, fill=Var2, label=Var1)) +
geom_bar(stat="identity", alpha=0.5) +
geom_segment(data=grid_data, aes(x = end, y = 30, xend = start, yend = 30),
colour = "grey", alpha=1, size=0.3 , inherit.aes = FALSE ) +
geom_segment(data=grid_data, aes(x = end, y = 20, xend = start, yend = 20),
colour = "grey", alpha=1, size=0.3 , inherit.aes = FALSE ) +
geom_segment(data=grid_data, aes(x = end, y = 10, xend = start, yend = 10),
colour = "grey", alpha=1, size=0.3 , inherit.aes = FALSE ) +
annotate("text", x = rep(max(var.sens$id),3), y = c(10, 20, 30),
label = c("10", "20", "30") , color="grey", size=3 , angle=0,
fontface = "bold", hjust = 1) +
geom_bar(stat = "identity", alpha = 0.5) +
ylim(-30,40) +
theme_minimal() +
theme(
legend.position = "none",
axis.text = element_blank(),
axis.title = element_blank(),
panel.grid = element_blank(),
plot.margin = unit(rep(-1,4), "cm")) +
coord_polar() +
geom_text(data=label_data, aes(x=id, y=Freq+2, label=Var1, hjust=hjust),
color="black", fontface="bold",alpha=0.6, size=2,
angle= label_data$angle, inherit.aes = FALSE ) +
geom_segment(data=base_data, aes(x = start, y = -2, xend = end, yend = -2),
colour = "black", alpha=0.8, size=0.75 , inherit.aes = FALSE ) +
geom_text(data=base_data, aes(x = title, y = -4, label=Var2),
hjust=c(1,1,1,1,1,1,0,0,0,0,0,0),
vjust=c(0,0,0,0,0,0,0,0,0,0,0,0),
angle=c(90,70,40,20,0,-5,100,70,60,0,-40,-60),
colour = "black", alpha=0.8, size=2, fontface="bold",
inherit.aes = FALSE)
circ.plot
This produces this circular plot
However, the graphics are really grainy and the lines aren't crisp. The text seems wonky as well. This isn't like the examples from the code I made this from. Has anyone had an issue with the graphics from ggplot like this? And how do you solve them? Or is this just an issue with circular plots?