我有两个轮廓子图,分别带有Z数据。我只希望有一个涵盖两个比例尺的颜色条。请参阅下面的照片,了解现在的情况。我不知道如何在python中执行此操作。我主要熟悉Matlab。如果您有任何建议,请告诉我。
import pandas as pd
from plotly.graph_objs import *
import plotly.tools as tools
from plotly.subplots import make_subplots
import plotly.graph_objects as go
PPFD_6in = pd.read_csv('MasterData.csv')
Pow50 = PPFD_6in['P50']
Pow100 = PPFD_6in['P100']
x_data = PPFD_6in['X'] / 12
y_data = PPFD_6in['Y'] / 12
# Pow50.describe()
# Pow100.describe()
fig = tools.make_subplots(rows=1, cols=2, shared_yaxes=True)
fig.add_trace(go.Contour(x=x_data,y=y_data,z=Pow50,
contours=dict(
coloring ='heatmap',
showlabels = True,
labelfont = dict(
size = 12,
color = 'white',
)
)
),row=1, col=1)
fig.add_trace(go.Contour(x=x_data,y=y_data,z=Pow100,
contours=dict(
coloring ='heatmap',
showlabels = True,
labelfont = dict(
size = 12,
color = 'white',
)
)
),row=1, col=2)
fig.show()