Skip to content
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

More flexible data input #8

Open
ewu63 opened this issue Jun 15, 2021 · 0 comments
Open

More flexible data input #8

ewu63 opened this issue Jun 15, 2021 · 0 comments
Labels
discussion This needs to be discussed first enhancement New feature or request

Comments

@ewu63
Copy link
Collaborator

ewu63 commented Jun 15, 2021

Description of feature

Currently, I believe all the data inputted must share the same x value, which is rather limiting. I would like to be able to plot arbitrary x-y pairs (perhaps with an identifier that can be used as a legend item) on subplots.

For example, the following data structure might be able to make two subplots, the top one containing two lines and the bottom one a single line. These subplots share the same x axis/label, but have separate y-axis labels ("Lift" and "Drag"). The user can optionally add legends to the line (e.g. "Composite" or "Metallic").

data = OrderedDict(
    {
        "Lift": [
            {"Time (s)": np.ones(5), "Composite": np.ones(5)},
            {"Time (s)": np.ones(3), "Metallic": np.ones(3)},
        ],
        "Drag": [
            {"Time (s)": np.ones(2), "Composite": np.ones(2)},
        ],
    }
)

Does this make sense? Are there better data formats available? We also want to take care of the simple case where all the lines share the same x values, but maybe it's not too bad to ask the user to provide the same array a bunch of times?

@ewu63 ewu63 added enhancement New feature or request discussion This needs to be discussed first labels Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This needs to be discussed first enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant