79824313

Date: 2025-11-19 10:25:19
Score: 0.5
Natty:
Report link

My solution was to use convex hull instead of ellipses:

library(ggforce)

p1 <- ggplot(mca_coords, aes(x = `Dim 1`, y = `Dim 2`, color = archetype)) +
  geom_hline(yintercept = 0, color = "grey50", linewidth = 0.5, linetype = "dashed") +
  geom_vline(xintercept = 0, color = "grey50", linewidth = 0.5, linetype = "dashed") +
  geom_mark_hull(aes(fill = archetype), alpha = 0.15, concavity = 1, 
                 expand = unit(2, "mm"), radius = unit(2, "mm")) +
  geom_jitter(size = 3, alpha = 0.6, width = 0.03, height = 0.03) +
  labs(title = "(A) Archetype Clustering in Feature Space",
       x = paste0("Dim 1: Essential ↔ Non-essential (", round(mca_res$eig[1,2], 1), "%)"),
       y = paste0("Dim 2: Retail/Commercial ↔ Industrial (", round(mca_res$eig[2,2], 1), "%)"),
       color = "Archetype",
       fill = "Archetype") +
  theme_minimal() +
  theme(panel.grid = element_blank(),
        legend.position = "bottom") + theme(panel.grid = element_blank(),
                                            legend.position = "bottom",
                                            axis.line = element_line(linewidth = 1))

p1

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nikos