Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to build a scatterplot and have problems with assigning the correct r value. Here you have a glimpse at my dataset:

Dataset

As you see, the first column represents the names of bikes, columns 2 to 11 show different geometry data. I want the scatterpolar to look like this:

plot_ly(
  type = 'scatterpolar',
  mode = 'markers',
  fill = "toself",
  r = c(435, 65.5, 629, 1193, 434, 440, 73.5, 635, 100, 32),
  theta = c("Kettenstrebe", "Lenkwinkel","Oberrohr","Radstand","Reach","Sattelrohr","Sitzwinkel","Stack","Steuerrohr",
                  "Tretlagerabsenkung"),
  showlegend = TRUE,
  name = ComparisonTable[1,1])

Scatterpolar

How can I define the r value in a way, that it automatically shows the values of the desired row?

I tried the following code, but without success:

plot_ly(
  type = 'scatterpolar',
  mode = 'markers',
  fill = "toself",
  r = as.matrix(ComparisonTable[1]),
  theta = c("Kettenstrebe", "Lenkwinkel","Oberrohr","Radstand","Reach","Sattelrohr","Sitzwinkel","Stack","Steuerrohr",
                  "Tretlagerabsenkung"),
  showlegend = TRUE,
  name = ComparisonTable[1,1])

I am happy to get your expertise on the problem!

question from:https://stackoverflow.com/questions/65873920/selecting-the-values-of-a-row-for-r-in-a-scatterpolar

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
715 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...