Raise exception when performing plot_2D_Data for DataND with one value for requested axis
Opened this issue · 0 comments
EmileDvs commented
The plot_2D_Data is not working if the axis is requested whereas it has only one value. The plot crashes because xlabel and xticks are not initialized if they are None, due to the following code part:
if (
axis.extension
in [
"whole",
"interval",
"oneperiod",
"antiperiod",
"smallestperiod",
"axis_data",
"list",
]
and len(axis.values) > 1
or (len(axis.values) == 1 and len(axes_list) == 1)
)
Maybe it is best to clearly raise an Exception for this case ?