I have a matrix with the following entries:
dput(MilDis[1:200,]) structure(list(hhDomMil = c(\"HED\", \"ETB\", \"HED\", \"ETB\", \"PER\", \"BUM\", \"EXP\",
If you relevel your hhDomMil as a factor like this:
o<-c("ETB" "PMA" "PER" "KON" "TRA" "DDR" "BUM" "MAT" "HED" "EXP") d$hh<-factor(d$hhDomMil,levels=o)
then your plot will be in the order you like:
ggplot(d,(aes(x=kclust, fill=hh))) +geom_bar(position="fill")