Script Use of Lexicometry in Sensometrics

Figure 8. Representation of the groups

plot.MFA(res.mfact.23,choix="group",invisible=c("col"),cex=0.8, col.hab="black",
title="Representation of the judges-groups",palette=gray(c(0.2,0.2)), graph.type="classic" )

 

To build a plot with colours:

 

Coord.Fig8 <- as.data.frame(res.mfact.23$group$coord)
Coord.Fig8
         Dim.1      Dim.2     Dim.3      Dim.4       Dim.5      Dim.6      Dim.7
FE5  0.5216814 0.90852822 0.5619642 0.20877440 0.105779334 0.12352713 0.01392934
FE6  0.6002783 0.71625549 0.4998249 0.37654161 0.379024993 0.16576030 0.05657409
FE12 0.4783115 0.31481748 0.2339717 0.27808932 0.488434228 0.56415664 0.05194351
FP1  0.5650040 0.25494670 0.6179186 0.05964175 0.229198782 0.14667692 0.16360350
FP3  0.6493209 0.52444283 0.2747015 0.37261156 0.091096238 0.35657346 0.19602618
FP4  0.4606929 0.39027844 0.2195386 0.41694722 0.387149399 0.16154924 0.17237528
FP5  0.8095360 0.76773875 0.6507755 0.52339493 0.369177769 0.39529002 0.28098166
FP6  0.5828876 0.24419601 0.0978394 0.31751967 0.359608227 0.22775066 0.07663075
FP7  0.6623824 0.56124473 0.3691041 0.76684383 0.414276810 0.51229562 0.39160361
FP8  0.7239697 0.53476966 0.5688735 0.74253857 0.610451832 0.60224937 0.45471021
FP9  0.3024460 0.59153287 0.1607821 0.49132803 0.351611106 0.08136717 0.01152154
FP10 0.7537059 0.39216560 0.2883407 0.21859139 0.003741619 0.06253460 0.22219480
FP11 0.5808224 0.58749162 0.3926773 0.55058341 0.491383336 0.30138881 0.62584340
FP12 0.2461591 0.43342072 0.6843637 0.27038529 0.237030853 0.28507765 0.03458458
CE1  0.3927448 0.13505090 0.5797389 0.48327460 0.213030308 0.17663934 0.15579780
CE2  0.7859212 0.84520182 0.8923044 0.11179396 0.058550375 0.04281726 0.01859976
CE3  0.8924167 0.79769680 0.4460350 0.29913421 0.058242724 0.08353784 0.03440521
CE4  0.7995879 0.02390627 0.3848818 0.42127090 0.064801096 0.19448959 0.05422044
CE7  0.3774172 0.77308627 0.2922621 0.81314369 0.542210364 0.25035583 0.01787256
CE8  0.3776991 0.78254070 0.7271908 0.07148931 0.059739455 0.02338295 0.01700590
CE9  0.9183888 0.16856257 0.3670783 0.16226667 0.123405795 0.14076731 0.09334841
CE10 0.2131024 0.74854551 0.6434280 0.33965890 0.066816110 0.25775989 0.04459203
CE11 0.5739049 0.57027313 0.2378571 0.27550991 0.107443601 0.23735186 0.02220830

 

Coord.Fig8$type <- 1 # French by default
Coord.Fig8$type[15:23] <- 2 # Catalan judges
df.ilustrat <- as.data.frame(res.mfact.23$group$coord.sup)
df.ilustrat$type <- 3 # Liking score
Coord.Fig8 <- rbind(Coord.Fig8, df.ilustrat)
Coord.Fig8$type <- as.factor(Coord.Fig8$type)
Coord.Fig8
                 Dim.1      Dim.2      Dim.3      Dim.4       Dim.5      Dim.6      Dim.7 type
FE5          0.5216814 0.90852822 0.56196425 0.20877440 0.105779334 0.12352713 0.01392934    1
FE6          0.6002783 0.71625549 0.49982489 0.37654161 0.379024993 0.16576030 0.05657409    1
FE12         0.4783115 0.31481748 0.23397168 0.27808932 0.488434228 0.56415664 0.05194351    1
FP1          0.5650040 0.25494670 0.61791858 0.05964175 0.229198782 0.14667692 0.16360350    1
FP3          0.6493209 0.52444283 0.27470152 0.37261156 0.091096238 0.35657346 0.19602618    1
FP4          0.4606929 0.39027844 0.21953860 0.41694722 0.387149399 0.16154924 0.17237528    1
FP5          0.8095360 0.76773875 0.65077554 0.52339493 0.369177769 0.39529002 0.28098166    1
FP6          0.5828876 0.24419601 0.09783940 0.31751967 0.359608227 0.22775066 0.07663075    1
FP7          0.6623824 0.56124473 0.36910409 0.76684383 0.414276810 0.51229562 0.39160361    1
FP8          0.7239697 0.53476966 0.56887345 0.74253857 0.610451832 0.60224937 0.45471021    1
FP9          0.3024460 0.59153287 0.16078205 0.49132803 0.351611106 0.08136717 0.01152154    1
FP10         0.7537059 0.39216560 0.28834068 0.21859139 0.003741619 0.06253460 0.22219480    1
FP11         0.5808224 0.58749162 0.39267735 0.55058341 0.491383336 0.30138881 0.62584340    1
FP12         0.2461591 0.43342072 0.68436370 0.27038529 0.237030853 0.28507765 0.03458458    1
CE1          0.3927448 0.13505090 0.57973889 0.48327460 0.213030308 0.17663934 0.15579780    2
CE2          0.7859212 0.84520182 0.89230435 0.11179396 0.058550375 0.04281726 0.01859976    2
CE3          0.8924167 0.79769680 0.44603496 0.29913421 0.058242724 0.08353784 0.03440521    2
CE4          0.7995879 0.02390627 0.38488184 0.42127090 0.064801096 0.19448959 0.05422044    2
CE7          0.3774172 0.77308627 0.29226211 0.81314369 0.542210364 0.25035583 0.01787256    2
CE8          0.3776991 0.78254070 0.72719078 0.07148931 0.059739455 0.02338295 0.01700590    2
CE9          0.9183888 0.16856257 0.36707827 0.16226667 0.123405795 0.14076731 0.09334841    2
CE10         0.2131024 0.74854551 0.64342805 0.33965890 0.066816110 0.25775989 0.04459203    2
CE11         0.5739049 0.57027313 0.23785706 0.27550991 0.107443601 0.23735186 0.02220830    2
SumTable_Fr  0.9800737 0.80778408 0.54886365 0.47111989 0.383769737 0.34998439 0.24049454    3
SumTable_Cat 0.9295460 0.64600472 0.74811075 0.43304743 0.202873131 0.22035000 0.08454973    3
Liking.score 0.1020069 0.79386948 0.08315279 0.04150343 0.017035970 0.01468950 0.01005005    3
col1gr <- c("white", "black", "#33CC33") # Background colours French, Catalan, Scores
col2gr <- c("red", "white", "white") # Word colours French, Catalan, Scores
set.seed(12345)
Figure8 <- ggplot(Coord.Fig8, aes(x=Dim.1, y=Dim.2, label = rownames(Coord.Fig8)))+
theme_classic()+ coord_fixed()+
geom_hline(yintercept=0, linetype="dashed", color = "grey")+
geom_vline(xintercept=0, linetype="dashed", color = "grey")+
geom_label_repel(size=5, fontface = "bold", max.overlaps=44,
box.padding = unit(0.35, "lines"),
aes(x=Dim.1, y=Dim.2, label = rownames(Coord.Fig8), fill = type, color=type))+
labs(x=labx)+labs(y=laby)+
theme(axis.title.x= element_text(size=17, face="bold"))+
theme(axis.title.y= element_text(size=17, face="bold"))+
theme(axis.text.x = element_text(size=rel(1.6)))+
theme(axis.text.y = element_text(size=rel(1.6))) +
theme(plot.margin = grid::unit(c(t=5,r= 2,b=3, l=2), "mm"))+
scale_fill_manual(values = setNames(col1gr, levels(Coord.Fig8$type))) +
scale_color_manual(values = setNames(col2gr, levels(Coord.Fig8$type)))+
ggtitle("Figure 8. Representation of the judges-groups")+
theme (legend.position="none")+
theme(axis.title.x = element_text(margin=margin(t=10))) +
theme(panel.border = element_rect(colour = "black", fill=NA, linewidth=1))
Figure8