1

imshow グラフの選択した領域にパターンを配置する方法はありますか? 正確には、数値データを運ぶ色付きの四角形に加えて、他の四角形のさまざまなパターンが実験のさまざまな失敗モードを示すようにする必要があります (また、これらの意味を説明するキーを生成します)異なるパターン)。有用なパターンの例は、さまざまなタイプのクロスハッチです。グラフ上の主要な色と数値データの関係を乱すことなく、これを実行できる必要があります。

グラフを含む GUI のために作業しているバックエンドが原因で、パッチを利用できません (マルチプロセッシング パッケージを介してバックエンドからフロントエンドにピクルして作成することができません)。誰かがこれを行う別の方法を知っているかどうか疑問に思っていました。

grid = np.ma.array(grid, mask=np.isnan(grid))
ax.imshow(grid, interpolation='nearest', aspect='equal', vmax = private.vmax, vmin = private.vmin)
# Up to here works fine and draws the graph showing only the data with white spaces for any point that failed
if show_fail and faildat != []:
    faildat = faildat[np.lexsort((faildat[:,yind],faildat[:,xind]))]
    fails = []
    for i in range(len(faildat)):  #gives coordinates with failures as (x,y)
        fails.append((faildat[i,1],faildat[i,0]))
    for F in fails:
         ax.FUNCTION NEEDED HERE
ax.minorticks_off()
ax.set_xticks(range(len(placex)))        
ax.set_yticks(range(len(placey)))
ax.set_xticklabels(placex)        
ax.set_yticklabels(placey, rotation = 0)
ax.colorbar()
ax.show()
4

0 に答える 0