2016-08-01 14 views
2

私は視覚化スコアリングアルゴリズムの散布図とボックスプロットを組み合わせようとしています。私のデータは、以下のように分割されています同じoX位置の異なるボックスプロット

  • OX -
  • 2のアルゴリズム異なるシミュレーションとの各期間のスコアに関する情報 - 期間(など1年、2年、)
  • オイに関する情報結果(ボックスプロットとしてプロット)Iが容易時間の各期間のための方法の効率を比較しようとしている(点としてプロット)は、単一の値

  • 2ヒューリスティック。

    小サンプルデータ:( enter image description here

    これまでのところ、私は各アルゴリズムのための観測を持つように私のデータをクリアしました:

    1 year    2 years   
    A1 A2 H1 H2 A1 A2 H1 H2 
    124 168 155 167 130 130 150 164 
    102 155   100 172  
    103 153   117 145  
    102 132   145 143  
    145 170   133 179  
    136 125   115 153  
    116 150   136 131  
    146 192   106 148  
    124 122   127 158  
    128 123   149 200  
    141 158   137 156  
    

    私はこのようなものを取得しようとしていますRS、EA)と各期間(52,104,156など)別にlike soしかし、私はどのように同じXティックの2つの異なるボックスプロットを描画しながら期間ごとにグループ化するのか分かりません。 boxplotデータフレームとプロットを並べ替えると、一番上に散布図をプロットすることができます。

  • 答えて

    0

    は、それが助け場合には、この一方を解決するためのマネージド誰アウト:この中

    ax1 = sns.boxplot(data = meta, x = 'Time', y = 'PRS', color = '#880BDD', linewidth=0.8) 
    ax1 = sns.boxplot(data = meta, x = 'Time', y = 'EA', color = '#0BC9DD', linewidth=0.8) 
    ax1 = sns.boxplot(data = meta, x = 'Time', y = 'ERS', color = '#9BD19D', linewidth=0.8) 
    ax1 = sns.pointplot(data = simple, x = 'Time', y = 'Greedy Average', color='#FFC48C', markers ='s', join=False) 
    ax1 = sns.pointplot(data = simple, x = 'Time', y = 'Greedy Total', color='#FF9F80', markers='o', join=False) 
    ax1 = sns.pointplot(data = simple, x = 'Time', y = 'Greedy Weeks', color='#F56991', markers='*', join=False) 
    ax1.set(xlabel = "Planning Horizon (weeks)") 
    ax1.set(ylabel = "Hypervolume") 
    EA = mpatches.Patch(color='#0BC9DD', label = 'EA') 
    PRS = mpatches.Patch(color='#880BDD', label = 'PRS') 
    ERS = mpatches.Patch(color='#9BD19D', label = 'ERS') 
    GA = mlines.Line2D([], [], color='#FFC48C', marker = 's', label = 'Greedy Average') 
    GT = mlines.Line2D([], [],color='#FF9F80', label = 'Greedy Total', marker = 'o') 
    GW = mlines.Line2D([], [],color='#F56991', label = 'Greedy Weeks', marker = '*') 
    plt.legend(handles = [EA, ERS, PRS, GA, GT, GW], loc = 'bottom left', title = "Algorithm") 
    ax1.set_title("Algorithm Comparison") 
    

    結果:

    enter image description here

    関連する問題