0

I'm using plotly to create plots and I'm trying to create a box plot with the following data

data = data.frame(conn_1000 = c(970.09, 384, 1495), conn_2000 = c(970.09, 384, 1495), conn_4000 = c(1042.72, 685, 1495), conn_6000 = c(1012.92, 68, 1482))

plot_ly(y = data, type = "box")

As result I get an empty plot. Do you know where is the mistake?

1 Answer 1

3

You can try to melt your data and add group and y

because you need data in long format, but now you have in wide

plotly::plot_ly( data=reshape2::melt(data), type = "box",group = variable,y=value)

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.