You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the second example on this page, Scatterplot with Loess Smoother, add_lines has the attribute showlegend= TRUE and add markers has showlegend=FALSE, and in layout, legend = list(x = 0.80, y = 0.90), yet no legend appears. I would expect a line for the add_lines to show in the plot. I'm wondering if there's an issue? I'm struggling with something similar on a project of my own where I cannot get the legend to show for just one add_lines call.
library(plotly)
p <- plot_ly(mtcars, x = ~disp, color = I("black")) %>%
add_markers(y = ~mpg, text = rownames(mtcars), showlegend = FALSE) %>%
add_lines(y = ~fitted(loess(mpg ~ disp)),
line = list(color = '#07A4B5'),
name = "Loess Smoother", showlegend = TRUE) %>%
layout(xaxis = list(title = 'Displacement (cu.in.)'),
yaxis = list(title = 'Miles/(US) gallon'),
legend = list(x = 0.80, y = 0.90))
The text was updated successfully, but these errors were encountered:
In the second example on this page, Scatterplot with Loess Smoother, add_lines has the attribute showlegend= TRUE and add markers has showlegend=FALSE, and in layout, legend = list(x = 0.80, y = 0.90), yet no legend appears. I would expect a line for the add_lines to show in the plot. I'm wondering if there's an issue? I'm struggling with something similar on a project of my own where I cannot get the legend to show for just one add_lines call.
The text was updated successfully, but these errors were encountered: