Skip to content

preload val_map from orders #2105

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

Merged
merged 5 commits into from
Jan 21, 2020
Merged

preload val_map from orders #2105

merged 5 commits into from
Jan 21, 2020

Conversation

nicolaskruchten
Copy link
Contributor

Closes #2084 by populating val_map in a group-independent way. @emmanuelle thoughts on the approach?

)

for col in range(len(days)):
for trace in fig.select_traces(col=col + 1):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh great I didn't know fig.select_traces :-). Not sure it's documented anywhere.

@@ -182,3 +182,43 @@ def test_px_templates():
assert fig.layout.xaxis3.showgrid is None
assert fig.layout.yaxis2.showgrid
assert fig.layout.yaxis3.showgrid


def test_orthogonal_orderings():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great test!

@@ -182,3 +182,43 @@ def test_px_templates():
assert fig.layout.xaxis3.showgrid is None
assert fig.layout.yaxis2.showgrid
assert fig.layout.yaxis3.showgrid


def test_orthogonal_orderings():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth testing that adding in category_orders a value not present in the data does not break things?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I tried but it's a harder test to write and much slower :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I think I have a way to spot-check a few options

@emmanuelle
Copy link
Contributor

The approach (defining col and row numbers in advance) looks sound to me, and the test is very useful. 💃

@nicolaskruchten nicolaskruchten merged commit 37c8c81 into master Jan 21, 2020
@nicolaskruchten nicolaskruchten added this to the v4.5.0 milestone Jan 22, 2020
@nicolaskruchten nicolaskruchten deleted the px_orthogonal_ordering branch June 19, 2020 16:13
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.

Facet category order with missing data
2 participants