2017-11-23 8 views
0

평행 좌표 플롯을 쓰려고합니다. 선의 색상을 검정색으로하고 싶지만 불투명도가 있으므로 겹치는 선이 나머지 부분보다 어둡습니다. 플롯 평행 좌표의 예에서 색상에 불투명도를 설정할 수 있습니까?파이썬 : 플롯 : 평행 좌표 불투명도

import plotly.plotly as py 
import plotly.graph_objs as go 

import pandas as pd 

df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv") 

data = [ 
    go.Parcoords(
     line = dict(color = df['colorVal'], 
        colorscale = 'Jet', 
        showscale = True, 
        reversescale = True, 
        cmin = -4000, 
        cmax = -100), 
     dimensions = list([ 
      dict(range = [32000,227900], 
       constraintrange = [100000,150000], 
       label = 'Block Height', values = df['blockHeight']), 
      dict(range = [0,700000], 
       label = 'Block Width', values = df['blockWidth']), 
      dict(tickvals = [0,0.5,1,2,3], 
       ticktext = ['A','AB','B','Y','Z'], 
       label = 'Cyclinder Material', values = df['cycMaterial']), 
      dict(range = [-1,4], 
       tickvals = [0,1,2,3], 
       label = 'Block Material', values = df['blockMaterial']), 
      dict(range = [134,3154], 
       visible = True, 
       label = 'Total Weight', values = df['totalWeight']), 
      dict(range = [9,19984], 
       label = 'Assembly Penalty Weight', values = df['assemblyPW']), 
      dict(range = [49000,568000], 
       label = 'Height st Width', values = df['HstW']), 
      dict(range = [-28000,196430], 
       label = 'Min Height Width', values = df['minHW']), 
      dict(range = [98453,501789], 
       label = 'Min Width Diameter', values = df['minWD']), 
      dict(range = [1417,107154], 
       label = 'RF Block', values = df['rfBlock']) 
     ]) 
    ) 
] 

py.offline.plot(data, filename = 'parcoords-advanced') 

답변

0

plotly 2.1.0import plotly as py

그것은 불가능 보이는이 필요합니다. 거기에 대해 다음과 같이 그 이유는 아니오 "불투명도"에 관련되는 모든 옵션 : 부모 아래 경로 [ '라인']에서 '라인'[ 'parcoords']에 대한

유효한 속성 :

['autocolorscale', 'cauto', 'cmax', 'cmin', 'color', 'colorbar', 
'colorscale', 'colorsrc', 'reversescale', 'showscale'] 
부모 아래 경로에서 '치수'에 대한

유효한 속성 [ '크기'] [3] [ 'parcoords', '크기'] :

['constraintrange', 'label', 'range', 'tickformat', 'ticktext', 
'ticktextsrc', 'tickvals', 'tickvalssrc', 'values', 'valuessrc', 
'visible'] 

그러나 다른 패키지에있을 수 있습니다 https://plot.ly/python/line-and-scatter/ 언급 한 "불투명" plotly

R의 그림 또는 matplotlib.pyplot을 시도 할 수 있습니다