Eomys/SciDataTool

[BC] Bug when using plot_ND_Data on quantity with an axis containing strings as values

EmileDvs opened this issue · 2 comments

Hi all,

There seems to be a bug when plotting data if one of data axis contains strings as values. This can be particularly the case of data with is_components=True.

Best regards,
Emile

Hi Emile,

To solve this issue, I suggest the following: In the string case, a linspace of arbitrary values will be created for the x-axis, and tick labels corresponding to the strings will be added to the plot. I would like to rename "is_components" as "is_str" to be more explicit.

A tricky part is that we sometimes want to overlay curves with a "string axis", using the strings as legends (this situation is now automatically detected if a list was requested: "angle[0,10,20]" for example). To solve this issue, I suggest to use the syntax "phase[]" so that the parser can detect that the phase axis must be considered as a list, keeping all the values.

The "is_component" attribute has not been renamed yet, for retrocompability issues, but should be renamed in the future.

The new syntax "phase[]" has been inetgrated in #53