Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

plotly - Selecting the values of a row for r in a scatterpolar

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

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

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...