Hi,
I’m having some problems when I choose the colors of any plot manually… the color name appears in the legend!
diamonds1 ← diamonds[which(diamonds$cut == “Fair”),]
density1 ← density(diamonds1$carat)
diamonds2 ← diamonds[which(diamonds$cut == “Ideal”),]
density2 ← density(diamonds2$carat)
p ← plot_ly(x = ~density1$x, y = ~density1$y, type = ‘scatter’, mode = ‘lines’, name = ‘Fair cut’, fill = ‘tozeroy’,
fillcolor = ‘rgba(168, 216, 234, 0.5)’,
line = list(width = 0.5)) %>%
add_trace(x = ~density2$x, y = ~density2$y, name = ‘Ideal cut’, fill = ‘tozeroy’,
fillcolor = ‘rgba(255, 212, 96, 0.5)’) %>%
layout(xaxis = list(title = ‘Carat’),
yaxis = list(title = ‘Density’))
You can see the problem here:
Can you help me please?
Cheers,
Bruno
Thanks for bringing this to my attention! I’ve started a github issue which you can/should use to track progress on this – https://github.com/ropensci/plotly/issues/1279
1 Like
Hi Carson,
thank you for share it. The problem above happened when I was using the 3.4.3 version of R. Now, with 3.5.0, the bug dissapeared.
But, if I try to do a radar plot, the bug is there again…
Cheers,
Bruno
But, if I try to do a radar plot, the bug is there again…
Try re-installing the R package from GitHub, I just submitted a fix for this today
1 Like
Hi Carson, thanks for your help, that solved the problem!
Cheers,
Bruno