Changeset 32596

Show
Ignore:
Timestamp:
04/19/09 00:19:01 (4 years ago)
Author:
rezoo
Message:

プロットの二重登録をできるようにした

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/python/tremolo/tremolo/verificator.py

    r32551 r32596  
    152152                指定された指標群のプロットを行います. 
    153153                 
    154                 keys   : プロットする指標のリスト 
     154                keys   : プロットする指標のリスト. 
     155                         ex.["key1", "key2", "key3"] , ["key1", ["key2", "key3"]] 
    155156                start  : tの開始範囲 
    156157                end    : tの終了範囲 
    157                 main   : 大きく表示させたい指標のインデックス.-1ならば等間隔に設定 
    158                 margin : 余白の設定.top,right,bottom,leftの順に設定. 
    159                          指定されない場合はすべてが10%の余白をとる 
     158                main   : 大きく表示させたい指標のインデックス.-1ならば等間隔に設定される 
     159                margin : 余白の設定.(top, right, bottom, left)の順にタプルで指定. 
     160                         指定されない場合はすべてが10%の余白(0.1, 0.1, 0.1, 0.1)をとる 
    160161                grid   : グリッドを設定するかどうか.デフォルトはTrue 
    161162                """ 
    162163                from pylab import axes 
    163164                from matplotlib.ticker import NullFormatter 
    164                  
    165                 indication_list = [self.indications[key]["indication"] for key in keys] 
    166165                 
    167166                width  = 1.0 - margin[1] - margin[3] 
     
    188187                        axes_list.append(a) 
    189188                 
    190                 for (ind, ax) in zip(indication_list, axes_list): 
    191                         ind.plot(start, end, axes=ax, grid=grid) 
     189                for (key, ax) in zip(keys, axes_list): 
     190                        if type(key) == tuple or type(key) == list: 
     191                                for k in key: 
     192                                        ind = self.indications[k]["indication"] 
     193                                        ind.plot(start, end, axes=ax, gird=grid) 
     194                        else: 
     195                                ind = self.indications[key]["indication"] 
     196                                ind.plot(start, end, axes=ax, grid=grid) 
    192197