mx1 = Mark(20, {'color': 'b'}) my1 = Mark(20, {'color': 'b'}) mz1 = Mark(20, {'color': 'b'}) mx2 = Mark(20, {'color': 'r'}) my2 = Mark(20, {'color': 'r'}) mz2 = Mark(20, {'color': 'r'}) display_options = {} display_options['interpolation'] = 'nearest' display_options['cmap'] = pl.cm.gray ac_display_options = {} ac_display_options['interpolation'] = 'nearest' ac_display_options['cmap'] = pl.cm.autumn vx1 = ImshowView(ax_s1, bg, [mx1, 'h', '-v'], display_options) vx1.add_layer(maps, [cov1, mx1, 'h', '-v'], ac_display_options) vx1.add_hmark(my1) vx1.add_vmark(mz1) vy1 = ImshowView(ax_f1, bg, ['h', my1, '-v'], display_options) vy1.add_layer(maps, [cov1, 'h', my1, '-v'], ac_display_options) vy1.add_hmark(mx1) vy1.add_vmark(mz1) vz1 = ImshowView(ax_t1, bg, ['h', '-v', mz1], display_options) vz1.add_layer(maps, [cov1, 'h', '-v', mz1], ac_display_options) vz1.add_hmark(mx1) vz1.add_vmark(my1) vx2 = ImshowView(ax_s2, bg, [mx2, 'h', '-v'], display_options)
ac_display_options = {} ac_display_options['interpolation'] = 'nearest' ac_display_options['cmap'] = pl.cm.autumn ac_display_options['vmin'] = data_act.min() ac_display_options['vmax'] = data_act.max() # Marks mx = Mark(20, {'color': 'r'}) marks = [] views = [] for i in range(10): mz = Mark(i * 3 + 3, {'color': 'b'}) marks.append(mz) ax = fig.add_axes([0.14 * (i % 5), 0.55 * (1 - i / 5), 0.13, 0.45]) ax.axis('off') vz = ImshowView(ax, data, ['h', '-v', mz], display_options) vz.add_layer(data_act, ['h', '-v', mz], display_options=ac_display_options) views.append(vz) vz.add_hmark(mx) # Main figure ax_z = fig.add_axes([0.7, 0., 0.3, 1.]) ax_z.axis('off') vx = ImshowView(ax_z, data, [mx, 'h', '-v'], display_options) vx.add_layer(data_act, [mx, 'h', '-v'], display_options=ac_display_options) for m in marks: vx.add_vmark(m) vx.draw() for v in views: v.draw()
#ax_y = pl.subplot(232) #ax_z = pl.subplot(233) #ax_n = pl.subplot(212) ax_x = fig.add_axes([0.0, 0.2, 0.37, 0.8]) ax_y = fig.add_axes([0.38, 0.2, 0.37, 0.8]) ax_z = fig.add_axes([0.76, 0.2, 0.23, 0.8]) ax_n = fig.add_axes([0.05, 0.05, 0.9, 0.195]) ax_x.axis('off') ax_y.axis('off') ax_z.axis('off') # Views vx = ImshowView(ax_x, data, [mx, 'h', '-v', mn], display_options) vx.add_hmark(my) vx.add_vmark(mz) vy = ImshowView(ax_y, data, ['h', my, '-v', mn], display_options) vy.add_hmark(mx) vy.add_vmark(mz) vz = ImshowView(ax_z, data, ['h', '-v', mz, mn], display_options) vz.add_hmark(mx) vz.add_vmark(my) vn = PlotView(ax_n, data, [mx, my, mz, 'h'], {'color': 'gray'}) pl.ylim(0, np.max(data)) vn.add_hmark(mn)
my = Mark(20, {'color': 'g'}) mz = Mark(20, {'color': 'b'}) mn = Mark(0, {'color': 'k'}) ax_x = fig.add_axes([0.0, 0.4, 0.37, 0.6]) ax_y = fig.add_axes([0.38, 0.4, 0.37, 0.6]) ax_z = fig.add_axes([0.76, 0.4, 0.23, 0.6]) ax_n = fig.add_axes([0.05, 0.05, 0.9, 0.195]) ax_x.axis('off') ax_y.axis('off') ax_z.axis('off') # Views vx = ImshowView(ax_x, data, [mx, 'h', '-v', mn], display_options) vx.add_hmark(my) vx.add_vmark(mz) vy = ImshowView(ax_y, data, ['h', my, '-v', mn], display_options) vy.add_hmark(mx) vy.add_vmark(mz) vz = ImshowView(ax_z, data, ['h', '-v', mz, mn], display_options) vz.add_hmark(mx) vz.add_vmark(my) vn = PlotView(ax_n, data, [mx, my, mz, 'h'], {'color': 'gray'}) pl.ylim(np.min(data), 8000.) vn.add_hmark(mn)