Skip to content

[RFC][WIP] Auto map vars #750

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stuart-cls
Copy link
Member

Continuing from #654 (I'll rebase when ready)

Users get very confused (and I find it annoying) when Hyperspectra plots vs (clusters, map_x) or something instead of just (map_x, map_y) when they are present.

I added a XYDomainModel which reliably plots XY data in Hyperspectra if both these vars are present (otherwise reverts to existing behaviour).

If this works, I'll also apply to the other mapping-aware widgets (Bin, Stack, Polar, etc)

@stuart-cls
Copy link
Member Author

@markotoplak I saw your comment in #765 (comment) and wondered if my approach here with a custom XYDomainModel would also suffer from the settings bug you reference?

@markotoplak
Copy link
Collaborator

Yes, it could IF that model is connected to something that is changing a context setting AND that context setting is not limited in the same way as the model.

@stuart-cls
Copy link
Member Author

Hmm for part one, definitely:

class ImagePlot(BasicImagePlot):
    attr_x = ContextSetting(None, exclude_attributes=True)
    attr_y = ContextSetting(None, exclude_attributes=True)

For part two, indeed they seem to have different definitions: exclude_attributes is not exactly the same as METAS | CLASSES with valid_types=ContinousVariable

@stuart-cls
Copy link
Member Author

I see some tests are failing now :D I'll dig more

@stuart-cls
Copy link
Member Author

Indeed this triggers biolab/orange3#6721 in TestOWHyper.test_few_samples
It also hits a new bug since I wrote it due to ae1df1e since PyListModel.Seperator doesn't have a .name attribute.
And it's a bit weird that the map_x/map_y variables end up duplicated.

So I'm starting to think it's not worth the complexity, especially now that the attr_x/y combo boxes aren't hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants