Мне нужно изменить цвет моих меток данных на белый в базе R. Это возможно?
stemdata <- structure(list( #had to round some nums below for 100% bar
A = c(3, 20, 77),
B = c(6, 19, 75),
C = c(13,13, 74),
D = c( 13, 19, 68),
E = c( 3, 10, 87),
F = c(6, 16, 78),
G = c(3, 9, 88)),
.Names = c("Extent to which tour was useful",
"Food, travel, accommodations, and procedures",
"Travel itinerary and dates",
"Location of the STEM Tour stops",
"Interactions with presenters/guides",
"Duration of each STEM Tour stop",
"Overall quality of the STEM Tour"
),
class = "data.frame",
row.names = c(NA, -3L)) #4L=number of numbers in each letter vector#
attach(stemdata)
print(stemdata)
par(mar=c(0, 20, 1, 2.1)) # this sets margins to allow long labels
barplot(as.matrix(stemdata),
beside = F, ylim = range(0, 10), xlim = range(0, 100),
horiz = T, col=colors, main="N=29",
border=F, las=1, xaxt='n', width = 0.95)
legend(18,9, legend=c("Medium","High", "Very High"),
fill=colors, horiz = T, bty='n')
text(3.5, 0.7, "7%")
text(15, 0.7, "17%")
text(62, 0.7, "76%")
text(7, 2, "14%")
text(19, 2, "10%")
text(62, 2, "76%")
text(7, 3.2, "14%")
text(22.5, 3.2, "17%")
text(65.5, 3.2, "69%")
text(8, 4.4, "10%")
text(55, 4.4, "86%")
text(3.5, 5.6, "7%")
text(15, 5.6, "17%")
text(62, 5.6, "76%")
text(9, 6.9, "10%")
text(55, 6.9, "86%")
Я хотел бы иметь возможность добавлять белые метки данных без использования надстройки.пакет.Любая помощь, которую вы можете оказать, очень ценится.Большое спасибо!