from openalea.strawberry.import_mtgfile import import_mtgfile
from openalea.strawberry.analysis import extract_at_module_scale
from openalea.strawberry.analysis import df2waffle, plot_pie
mtg1 = import_mtgfile(filename= ["Gariguette"])
df = extract_at_module_scale(mtg1)
date = df['date']
tmp=df2waffle(df, index='order',
date=date[len(date)-1],
variable='stage',
aggfunc=lambda x: ' '.join(x),
crosstab=True)
pie_plt = plot_pie(tmp)
pie_plt.show()