Skip to content

Raise exception when performing plot_2D_Data for DataND with one value for requested axis #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
EmileDvs opened this issue Mar 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@EmileDvs
Copy link
Collaborator

EmileDvs commented Mar 8, 2022

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 ?

@EmileDvs EmileDvs added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Mar 8, 2022
@EmileDvs EmileDvs changed the title Error when performing plot_2D_Data for DataND with two axes and one time value Raise exception when performing plot_2D_Data for DataND with one value for requested axis Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant