2017-02-02 1 views

답변

0

색상은 문제없이 변경되어야합니다. 아래 샘플을 참조하십시오 (RGB 색상에도 적용됨).

속성이 (그리고 yaxis/2)이고, data이 아닌지 확인하십시오.

enter image description here

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

trace1 = go.Scatter(
    x=[1, 2, 3], 
    y=[40, 50, 60], 
    name='yaxis data', 
    marker={'color': 'red'} 
) 
trace2 = go.Scatter(
    x=[2, 3, 4], 
    y=[4, 5, 6], 
    name='yaxis2 data', 
    yaxis='y2', 
    marker={'color': 'blue'} 
) 
data = [trace1, trace2] 
layout = go.Layout(
    title='Double Y Axis Example', 
    yaxis=dict(
     title='yaxis title' 
    ), 
    yaxis2=dict(
     title='yaxis2 title', 
     titlefont=dict(
      color='green' 
     ), 
     tickfont=dict(
      color='pink' 
     ), 
     overlaying='y', 
     side='right' 
    ) 
) 
fig = go.Figure(data=data, layout=layout) 
plot_url = py.plot(fig, filename='multiple-axes-double') 
관련 문제