我花了很多时间来调整这个雷达图,它将用于约200个自动生成的报告中。 我似乎无法解决的唯一问题是,轴标签与轴标记重叠。在所附的示例中,问题位于图表的左侧。
有没有一种方法可以确定这些轴标签的放置位置?还是可以像在ggplot中那样将它们放在一个角度?
我想尽可能使用fmsb,因为我真的很喜欢这些图表的外观。
我在下面放置了一个代码,应该可以给您this result。图片从R的大小另存为.png:w = 1000 h = 813
segmat <- 7
colors_border=c("#ee7f00", "#00aba4")
colors_in=c("#f6bf8099", "#73d1cd99")
legend <- factor(c("Skole", "Land"))
library(likert)
library(fmsb)
datmat <- structure(list(`Data, Anvendelse` = c(80, 45, 76.9365245227314,
67.0674586834251), `Data, Viden` = c(80, 45, 73.8095238095238,
60.2180860386088), `Data, Ræsonnement` = c(80, 45, 65.6218434343434,
60.9232595763823), `Geometri, Anvendelse` = c(80, 45, 65.4590909090909,
52.8446335193598), `Geometri, Viden` = c(80, 45, 63.1238336316461,
55.0262048394226), `Geometri, Ræsonnement` = c(80, 45, 66.9981060606061,
50.2430105282051), `Tal, Anvendelse` = c(80, 45, 65.9269917792645,
53.701961851033), `Tal, Viden` = c(80, 45, 70.8290320790321,
65.5516016811992), `Tal, Ræsonnement` = c(80, 45, 57.5584072012643,
47.5568952748004)), row.names = c("1", "2", "Skole", "Land"), class = "data.frame")
radarchart(datmat, axistype = 2,
pcol=colors_border , pfcol=colors_in, plwd=3 , plty=1, seg=segmat,
vlcex=1.1, palcex=1.1,
mtext("Procentdel rigtige besvarelser for fagområder. Hver linje angiver en forskel på 5%", col = "darkgrey", font = 4, cex = 1.2),
axislabcol="black")
legend(1.0,-0.8,legend = reverse.levels(legend),
col=colors_border,cex=0.8,
pch = 16, lty =1 , lwd = 3)
title(main = list("Matematik", cex = 1.6, font = 4))