I have a dataframe with the following columns:
x y info1 info2 info3
I am trying to plot the data with r plotly:
plot_ly(data=df, x=x, y=y, mode="lines+markers", color = info1)
Is there a way to display info2/info3 when passing the cursor on one point of the data?
EDIT: Example
df <- read.table(header = TRUE, text="
y x info1 info2
John 1 group1 18.32929
John 10 group1 29
John 100 group1 13
Emily 1 group2 4
Emily 10 group2 10
Emily 100 group2 20")
plot_ly(data=df, x=x, y=y, mode="lines+markers", color = info1)
I would like when I pass on a point to also display the info2 such as John group1 18.32929