Open demisjohn opened 8 years ago
This exists in Device plot_input()
mode plot, see ab902950b2012fb5de9887b3b2e9fa4378557dba
It seems pretty simple (see above commit for argument/docstring):
if plot_type is 'pseudocolor':
cont = ax.pcolor( np.array(x), np.array(y), np.array(field)[:-1,:-1] , vmin=-maxfield, vmax=maxfield, cmap=cm_hotcold) # cm_hotcold, cm.hot, RdYlBu, RdPu, RdBu, PuOr,
elif plot_type is 'contourf':
cont = ax.contourf( np.array(x), np.array(y), np.array(field)[:-1,:-1] , vmin=-maxfield, vmax=maxfield, cmap=cm_hotcold) # cm_hotcold, cm.hot, RdYlBu, RdPu, RdBu, PuOr,
else:
ErrStr = 'Device "%s".plot_input_field(): ' % self.name + 'Unrecognized plot_type: `%s`. ' % plot_type + 'Please use `contour` or `psuedocolor` or leave unsepcified.'
raise ValueError( ErrStr )
ax.set_xlim( d['xmin'], d['xmax'] )
ax.set_ylim( d['ymin'], d['ymax'] )
fig.canvas.draw()
should add
pseudocolor
andcontourf
options. (¿And includeimage
option, as current implementation shows image viaimshow()
?)