R でプロットのすべての要素 (軸、軸ラベル、グリッド線、目盛りなど) を黒の背景で白くする簡単な方法はありますか? 黒の背景を作成するためのいくつかのオプションを見てきましたが、プロット要素の色を変更する方法がわかりません。
比較的複雑なプロットでこれを行うことを望んでいます。私のプロットは、虹彩データセットを使用した「グループごとに色を変更する」の下にある scatter3D の例と非常によく似ています。以下に、そのプロットを複製するために必要なコードを含めました。
library(plot3D)
# Set up data
data(iris)
x <- sep.l <- iris$Sepal.Length
y <- pet.l <- iris$Petal.Length
z <- sep.w <- iris$Sepal.Width
# Make 3d scatterplot with colors by category
scatter3D(x, y, z, bty = "g", pch = 18,
col.var = as.integer(iris$Species),
col = c("#1B9E77", "#D95F02", "#7570B3"),
pch = 18, ticktype = "detailed",
colkey = list(at = c(2, 3, 4), side = 1,
addlines = TRUE, length = 0.5, width = 0.5,
labels = c("setosa", "versicolor", "virginica")) )