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

Add waffle representation & partial plot #28

Merged
merged 9 commits into from
May 25, 2021
Merged

Add waffle representation & partial plot #28

merged 9 commits into from
May 25, 2021

Conversation

pomme-abricot
Copy link
Collaborator

The waffle dataframe creation from extracted data works.

The plot partially works: axes & grid spacing are not correctly displayed.

Partial fix of issue #27

@pomme-abricot pomme-abricot requested a review from pradal April 28, 2021 10:51
@@ -10,6 +10,15 @@
from openalea.mtg.algo import orders
from openalea.mtg import stat, algo, traversal

from pandas.core.groupby.groupby import DataError
Copy link
Contributor

Choose a reason for hiding this comment

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

Put first import of standard Python libraries.
Then 3rd party libs.
Then openalea ones (mtg & co)


def stage(vid, g):
_stage = g.property('Stade')
return next(iter(list(_stage[cid] for cid in g.components(vid) if cid in _stage)), None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not get it.
Why not just take the first element?
You do not need to convert it to a list.
And you can use components_iter

Copy link
Contributor

@pradal pradal left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks

@pomme-abricot pomme-abricot merged commit 7150ae4 into master May 25, 2021
@pomme-abricot pomme-abricot deleted the waffle branch May 26, 2021 08:04
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.

3 participants