Answers:
更改axis_colour以匹配背景,如果要动态修改背景,则需要同时更新axis_colour。*共享的图片显示了使用模拟数据的图/图示例()
### Main Plotting Function ###
plotXY <- function(time, value){
### Plot Style Settings ###
### default bg is white, set it the same as the axis-colour
background <- "white"
### default col.axis is black, set it the same as the background to match
axis_colour <- "white"
plot_title <- "Graph it!"
xlabel <- "Time"
ylabel <- "Value"
label_colour <- "black"
label_scale <- 2
axis_scale <- 2
symbol_scale <- 2
title_scale <- 2
subtitle_scale <- 2
# point style 16 is a black dot
point <- 16
# p - points, l - line, b - both
plot_type <- "b"
plot(time, value, main=plot_title, cex=symbol_scale, cex.lab=label_scale, cex.axis=axis_scale, cex.main=title_scale, cex.sub=subtitle_scale, xlab=xlabel, ylab=ylabel, col.lab=label_colour, col.axis=axis_colour, bg=background, pch=point, type=plot_type)
}
plotXY(time, value)