0
我的代碼是下面,但我想有白色映射到0,而不是data_bydate $ avg_score如何強制地圖零到白色R中plotly色標
g <- plot_ly(data_bydate, x = ~Date, y = ~avg_score, color =data_bydate$avg_score, colors = c("#FF0000","#FFFFFF", "#008000"), mode ='markers', marker = list(size=3)) %>%
layout(legend = list(orientation = 'h'),
xaxis = list(title = "",
zeroline = FALSE,
tickformat="%X",
showline = TRUE),
yaxis = list(title = "",
zeroline = FALSE,
showline = TRUE))
的最大值和最小值的中間值
眼下它不給一個圖,其中高於零個值是綠色的,低於零個值是紅色的......
的感謝!有用! – user7891984