小编use*_*738的帖子

R图例未在图中显示

我有以下R代码用于简单绘图:

ExperimentDataNames = c('Count', 'HumanData', 'ActualPrices')
ExperimentData <- read_csv("/Users/justin_chudley/desktop/ExperimentData.csv", col_names = ExperimentDataNames)

x <- Count <- ExperimentData$Count
y <- HumanData <- ExperimentData$HumanData
y1 <- ActualPrices <- ExperimentData$ActualPrices

plot(x,y, type = "l", xlab="Trial Number",ylab="$USD",main="Dow Jones Price vs Human Experiment")
lines(x,y1, type = "l", col=2)
legend=c('Human Data', 'Actual Prices') 
Run Code Online (Sandbox Code Playgroud)

由于某些原因,图例在此图中完全不显示: 在此处输入图片说明

为什么我的传说没有显示?

plot r legend

0
推荐指数
1
解决办法
812
查看次数

标签 统计

legend ×1

plot ×1

r ×1