Skip to content

Added figure to_ordered_dict method #1167

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 4 commits into from
Sep 8, 2018
Merged

Added figure to_ordered_dict method #1167

merged 4 commits into from
Sep 8, 2018

Conversation

jonmmease
Copy link
Contributor

@jonmmease jonmmease commented Sep 8, 2018

Adds a new BaseFigure method, to_ordered_dict. This builds and returns a representation of the figure as a nested structure of OrderedDict and list instances. The OrderedDict keys are sorted alphabetically. This makes it possible for library users to iterate over the nested structure of a figure in a deterministic order.

This method takes the place of the Figure.get_ordered method in plotly.py < 3.0.0.

See #1158 for some discussion

cc @scjody

This has less indirection, and seems to work around a strange
nose testing bug with frames.
@jonmmease jonmmease merged commit e0e185e into master Sep 8, 2018
@jonmmease jonmmease added this to the v3.2.1 milestone Sep 8, 2018
@nicolaskruchten nicolaskruchten deleted the bug_1158b branch June 19, 2020 16:14
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.

1 participant