To do this, you need to use geom_rect (). Modifying geom_bar () is not possible to do what you need, as polar geometry () creates a pink graph. Therefore, in order to have data plotted inward and not outward, geom_rect () is the only option (which I know of for ggplot2).
I will talk about the changes that I made first, show the graph, and then at the end I will turn on the entire function as changed.
I modified a block of code that computes xmin, xmax, ymin and ymax as follows:
xmin:
xmin <- (indexScore - 1) * (binSize + spaceBar) + (indexItem - 1) * (spaceItem + M * (binSize + spaceBar)) + (indexFamily - 1) * (spaceFamily - spaceItem)
xmin now:
xmin <- (binSize + spaceBar) + (indexItem - 1) * (spaceItem + (binSize + spaceBar)) + (indexFamily - 1) * (spaceFamily - spaceItem)
I deleted (indexScore-1) * and M * , because it is that the position of the bars for each point is next to each other. In each element, we want them to be in the same place x.
ymin:
ymin <- affine(1)
ymin now:
df<-df[with(df, order(family,item,value)), ] df<-ddply(df,.(item),mutate,ymin=c(1,ymax[1:(length(ymax)-1)]))
We want the ymin for each bar in each element to start with the ymax panel in front of it. To do this, I first ordered a data frame so that in each element the order of values ββis from lowest to highest. Then for each element, I set ymin to 1 for the lowest value, and then to ymax of the previous bar for all other values.
I also made some ascetic changes. In the family shortcuts section, I changed y=1.2 to y=1.7 because your item labels are long, so the family labels were therefore on top of them. I also added hjust=0.5 to the center of them and vjust=0 so that they are not so close to the element labels. As a result, this line:
p<-p+ylim(0,outerRadius+0.2)
Now:
p<-p+ylim(0,outerRadius+0.7)
Thus, labels are placed in the chart area.
Finally, this line:
familyLabelsDF<-aggregate(xmin~family,data=df,FUN=function(s) mean(s+binSize))
Now:
familyLabelsDF<-aggregate(xmin~family,data=df,FUN=function(s) mean(s+binSize/2))
This makes the family labels centered in each group.
Here's what it looks like:

And here is the whole function (latest version see GitHub ):
#