# Cannot get plot lines to appear in a parallel coordinates plot

**URL:** <https://community.plotly.com/t/cannot-get-plot-lines-to-appear-in-a-parallel-coordinates-plot/5761>\
**Category:** Plotly R\
**Created:** [September 13, 2017, 9:29pm UTC](https://community.plotly.com/t/cannot-get-plot-lines-to-appear-in-a-parallel-coordinates-plot/5761 "2017-09-13T21:29:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mboswell](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@mboswell](https://community.plotly.com/u/mboswell)\
**Post date:** [September 13, 2017, 9:29pm UTC](https://community.plotly.com/t/cannot-get-plot-lines-to-appear-in-a-parallel-coordinates-plot/5761/1 "2017-09-13T21:29:57Z")

</div>

I’m having trouble with plotly in R and ‘parcoords’. I’m trying to plot using colorscale defined by Persona. Persona has values of 1 through 4 and I expect each number to have it’s own color. The plot scales fine but there are no lines representing the values for each variable.

**Here is the code I’m using**

```
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)

```

**Here is the data frame**

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

Any guidance is appreciated

---

<div class="post-metadata">

**Author:** ![habibcss](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@habibcss](https://community.plotly.com/u/habibcss)\
**Post date:** [November 9, 2018, 2:45pm UTC](https://community.plotly.com/t/cannot-get-plot-lines-to-appear-in-a-parallel-coordinates-plot/5761/2 "2018-11-09T14:45:38Z")

</div>

Me to I have the same problem. did you find the response

library(plotly)

df \<- read.csv(“[https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords\_data.csv](https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv)”)

p \<- df %\>%  
plot\_ly(width = 1500, height = 600) %\>%  
add\_trace(type = ‘parcoords’,  
line = list(color = ~colorVal,  
colorscale = ‘Jet’,  
showscale = TRUE,  
reversescale = TRUE,  
cmin = -4000,  
cmax = -100),  
dimensions = list(  
list(range = c(~min(blockHeight),~max(blockHeight)),  
constraintrange = c(100000,150000),  
label = ‘Block Height’, values = ~blockHeight),  
list(range = c(~min(blockWidth),~max(blockWidth)),  
label = ‘Block Width’, values = ~blockWidth),  
list(tickvals = c(0,0.5,1,2,3),  
ticktext = c(‘A’,‘AB’,‘B’,‘Y’,‘Z’),  
label = ‘Cyclinder Material’, values = ~cycMaterial),  
list(range = c(-1,4),  
tickvals = c(0,1,2,3),  
label = ‘Block Material’, values = ~blockMaterial),  
list(range = c(~min(totalWeight),~max(totalWeight)),  
visible = TRUE,  
label = ‘Total Weight’, values = ~totalWeight),  
list(range = c(~min(assemblyPW),~max(assemblyPW)),  
label = ‘Assembly Penalty Weight’, values = ~assemblyPW),  
list(range = c(~min(HstW),~max(HstW)),  
label = ‘Height st Width’, values = ~HstW),  
list(range = c(~min(minHW),~max(minHW)),  
label = ‘Min Height Width’, values = ~minHW),  
list(range = c(~min(minWD),~max(minWD)),  
label = ‘Min Width Diameter’, values = ~minWD),  
list(range = c(~min(rfBlock),~max(rfBlock)),  
label = ‘RF Block’, values = ~rfBlock)  
)  
)

p

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/7/7cd403a658ad30280e9981ab4457d944b75df020.jpeg)
