GUI: display real part of complex fields
Previously, an error was thrown.
@@ -117,6 +117,9 @@ class PlotlyFigureBuilder(object):
else:
return { 'data': [{'type': 'heatmap', 'z': [[0]]}] }
+ if numpy.issubdtype(data.dtype, numpy.complex):
+ data = numpy.real(data)
+
# 1D graph
if len(data.shape) == 2:
return self.graphs(data, library)
