Commit 0a97a9ae authored by Philipp Arras's avatar Philipp Arras
Browse files

Multifrequency plotting with only one frequency

parent 646f0dbf
......@@ -348,8 +348,12 @@ def _plot2D(f, ax, **kwargs):
if len(dom) == 2:
if (not isinstance(dom[1], RGSpace)) or len(dom[1].shape) != 1:
raise TypeError("need 1D RGSpace as second domain")
rgb = _rgb_data(f.to_global_data())
have_rgb = True
if dom[1].shape[0] == 1:
from .sugar import from_global_data
f = from_global_data(f.domain[0], f.to_global_data()[..., 0])
rgb = _rgb_data(f.to_global_data())
have_rgb = True
foo = kwargs.pop("norm", None)
norm = {} if foo is None else {'norm': foo}
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