Skip to content

Instantly share code, notes, and snippets.

@daskol
Created April 27, 2016 11:21
Show Gist options
  • Save daskol/40a5222eb544595ffcfef2f2d618a81f to your computer and use it in GitHub Desktop.
Save daskol/40a5222eb544595ffcfef2f2d618a81f to your computer and use it in GitHub Desktop.
def density_plot(subplot_number, value, label, name, labels):
extent = (gx[0, 0], gx[-1, -1], gy[0, 0], gy[-1, -1])
ax = fig.add_subplot(120 + subplot_number, aspect='equal')
ax.set_xlabel(labels[0])
ax.set_ylabel(labels[1])
ax.set_title(name)
ax.imshow(value[0], extent=extent)
ax.contour(gx, gy, value[1].real, [0.0], colors='red', extent=extent)
ax.contour(gx, gy, value[1].imag, [0.0], colors='blue', extent=extent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment