我的数据框为:
数据为here。
注意:播种图中的睡眠时间=后端服务延迟(ms)
我现有的代码如下所示,我不知道如何进行。非常感谢您的帮助。
def save_multi_columns_categorical_charts(df):
)
# add_chart_details(title, filename)
fig, ax = plt.subplots()
all_columns = df['Throughput (Requests/sec'),'Back-end Service Delay (ms)', 'Concurrent Users','Scenario Name','Message Size (Bytes)']
答案 0 :(得分:1)
基本上,我需要做的是使用melt:
df_results = df_results.melt(id_vars=['Concurrent Users', col,'Scenario Name','Back-end Service Delay (ms)'],
value_vars=['Throughput (Requests/sec)'])
df_results['new_var'] = df_results[col] + ' - ' + df_results['Scenario Name']
g = sns.factorplot(x="Concurrent Users", y='value',
hue='new_var', col='Back-end Service Delay (ms)',
data=df_results, kind=kind,
size=5, aspect=1, col_wrap=2, legend=False)