rstudio - Plot values are not being generated by my code using R studio, plotly in R, and 'parcoords'. -


i'm having trouble plotly in r , 'parcoords'. i'm trying plot using colorscale defined persona. persona has values of 1 through 4 , expect each number have it's own color. plot scales fine there no lines representing values each variable.

here code

options(viewer=null)   p <- df %>%    plot_ly(type = 'parcoords',            line = list(color = ~persona,                        colorscale = list(c(0,'red'),c(0.5,'green'),c(1,'blue'),c(1.5,'yellow'))) ,            dimensions = list(             list(range = c(15,55),                  label = 'rescuer count', values = ~rescuercount),             list(range = c(15,50),                  label = 'rescuer share', values = ~rescuershare),             list(range = c(5,95),                  label = 'avg serviced zip codes', values = ~avgservzips),             list(range = c(10,925),                  label = 'avg number of rescues', values = ~ aavgnumofrescues),             list(range = c(310,16000),                  label = 'avg rescuer earnings', values = ~ aaearnings),             list(range = c(1,55),                  label = 'persona share of earnings', values = ~ earnshare),             list(range = c(30,95),                  label = ' login percentage', values = ~ loginprct),             list(range = c(7,95),                  label = 'prct of login days w/offer', values = ~ prctlogindayswo),             list(range = c(1,5),                  label = 'avg acceptance rate', values = ~ avgacceptrate),             list(range = c(150,1975),                  label = 'annualized number of offers', values = ~ anumofoffers)           )  )  print(p) 

data table here

persona rescuercount rescuershare avgservzips aavgnumofrescues aaearnings earnshare loginprct prctlogindayswo avgacceptrate anumofoffers 1 16 15 45 389 6706 27 71 91 30 1314 2 13 15 90 915 15805 51 91 94 47 1954 3 30 27 28 147 2429 18 55 86 22 679 4 51 46 6 20 319 4 34 75 13 152

resulting plot

please help


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -