Commit 8662faa1 authored by Philipp Arras's avatar Philipp Arras
Browse files

Adapt to matplotlib names

parent bbd94ccc
Pipeline #75327 passed with stages
in 8 minutes and 37 seconds
...@@ -417,7 +417,7 @@ def _plot2D(f, ax, **kwargs): ...@@ -417,7 +417,7 @@ def _plot2D(f, ax, **kwargs):
else: else:
im = ax.imshow( im = ax.imshow(
f.val.T, extent=[0, nx*dx, 0, ny*dy], f.val.T, extent=[0, nx*dx, 0, ny*dy],
vmin=kwargs.get("zmin"), vmax=kwargs.get("zmax"), vmin=kwargs.get("vmin"), vmax=kwargs.get("vmax"),
cmap=cmap, origin="lower", **norm, **aspect) cmap=cmap, origin="lower", **norm, **aspect)
plt.colorbar(im) plt.colorbar(im)
_limit_xy(**kwargs) _limit_xy(**kwargs)
...@@ -453,7 +453,7 @@ def _plot2D(f, ax, **kwargs): ...@@ -453,7 +453,7 @@ def _plot2D(f, ax, **kwargs):
if have_rgb: if have_rgb:
plt.imshow(res, origin="lower") plt.imshow(res, origin="lower")
else: else:
plt.imshow(res, vmin=kwargs.get("zmin"), vmax=kwargs.get("zmax"), plt.imshow(res, vmin=kwargs.get("vmin"), vmax=kwargs.get("vmax"),
norm=norm.get('norm'), cmap=cmap, origin="lower") norm=norm.get('norm'), cmap=cmap, origin="lower")
plt.colorbar(orientation="horizontal") plt.colorbar(orientation="horizontal")
return return
......
...@@ -54,7 +54,7 @@ def test_plots(): ...@@ -54,7 +54,7 @@ def test_plots():
plot.output(title='Three plots', name=next(name)) plot.output(title='Three plots', name=next(name))
plot = ift.Plot() plot = ift.Plot()
plot.add(field_hp, title='HP planck-color', colormap='Planck-like') plot.add(field_hp, title='HP planck-color', cmap='Planck-like')
plot.add(field_rg1_2, title='1d rg') plot.add(field_rg1_2, title='1d rg')
plot.add(field_ps) plot.add(field_ps)
plot.add(field_gl, title='GL') plot.add(field_gl, title='GL')
......
Supports Markdown
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