Commit 69216daa authored by Martin Reinecke's avatar Martin Reinecke

fix 2D RG plots

parent 1daa9c51
...@@ -226,14 +226,10 @@ def _plot(f, ax, **kwargs): ...@@ -226,14 +226,10 @@ def _plot(f, ax, **kwargs):
return return
elif len(dom.shape) == 2: elif len(dom.shape) == 2:
f = f[0] f = f[0]
nx = dom.shape[0] nx, ny = dom.shape
ny = dom.shape[1] dx, dy = dom.distances
dx = dom.distances[0] im = ax.imshow(fld.to_global_data().T,
dy = dom.distances[1] extent=[0, nx*dx, 0, ny*dy],
xc = np.arange(nx, dtype=np.float64)*dx
yc = np.arange(ny, dtype=np.float64)*dy
im = ax.imshow(fld.to_global_data(),
extent=[xc[0], xc[-1], yc[0], yc[-1]],
vmin=kwargs.get("zmin"), vmin=kwargs.get("zmin"),
vmax=kwargs.get("zmax"), cmap=cmap, origin="lower", vmax=kwargs.get("zmax"), cmap=cmap, origin="lower",
**norm) **norm)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment