I require a diagonal line through the origin of this plot
Something similar to ggplot2's geom_abline(intercept = 0 , slope = 1)
But for plotly in R
library(plotly)
fig <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length)
fig
I require a diagonal line through the origin of this plot
Something similar to ggplot2's geom_abline(intercept = 0 , slope = 1)
But for plotly in R
library(plotly)
fig <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length)
fig
Copyright © 2021 Jogjafile Inc.
A line shape could be used to achive this:
Also see this related answer.
Btw. via
xref = "paper"we don't need to specify start and end points for the line, however the line is no longer aligned with the axes.