1
1
import os
2
2
os .environ ['DEVELOPMENT' ] = 'True'
3
+
3
4
import pandas as pd
4
5
import matplotlib .pyplot as plt
5
6
import seaborn as sns
32
33
)
33
34
model .run_model (till_termination = True )
34
35
35
- fig ,ax = plt .subplots (2 ,1 ,figsize = (12 ,14 ))
36
+ # fig,ax=plt.subplots(2,1,figsize=(12,14))
36
37
37
38
38
39
# YIELD POTENTIAL TESTS
39
40
model ._outputs .final_stats = model ._outputs .final_stats .set_index ('Harvest Date (YYYY/MM/DD)' )
40
- final_stats_m = model ._outputs .final_stats .melt (value_name = 'yield' , value_vars = ['Yield potential (tonne/ha)' , 'Dry yield (tonne/ha)' ], var_name = 'yield type' , ignore_index = False ).reset_index ()
41
+ # final_stats_m=model._outputs.final_stats.melt(value_name='yield', value_vars=['Yield potential (tonne/ha)', 'Dry yield (tonne/ha)'], var_name='yield type', ignore_index=False).reset_index()
41
42
42
- sns .barplot (data = final_stats_m , x = 'Harvest Date (YYYY/MM/DD)' , y = 'yield' ,hue = 'yield type' , ax = ax [0 ])
43
+ # sns.barplot(data=final_stats_m, x='Harvest Date (YYYY/MM/DD)', y='yield',hue='yield type', ax=ax[0])
43
44
44
- model ._outputs .crop_growth = model ._outputs .crop_growth .set_index ('time_step_counter' )
45
- crop_growth_m = model ._outputs .crop_growth .melt (value_name = 'yield' , value_vars = ['YieldPot' , 'DryYield' ], var_name = 'yield type' , ignore_index = False ).reset_index ()
45
+ # model._outputs.crop_growth=model._outputs.crop_growth.set_index('time_step_counter')
46
+ # crop_growth_m=model._outputs.crop_growth.melt(value_name='yield', value_vars=['YieldPot', 'DryYield'], var_name='yield type', ignore_index=False).reset_index()
46
47
47
- sns .scatterplot (data = crop_growth_m , x = 'time_step_counter' , y = 'yield' ,hue = 'yield type' , ax = ax [1 ])
48
+ # sns.scatterplot(data=crop_growth_m, x='time_step_counter', y='yield',hue='yield type', ax=ax[1])
48
49
49
50
# FRESH/DRY YIELD TESTS
50
51
# model._outputs.final_stats=model._outputs.final_stats.set_index('Harvest Date (YYYY/MM/DD)')
57
58
58
59
# sns.lineplot(data=crop_growth_m, x='time_step_counter', y='yield',hue='yield type', ax=ax[1])
59
60
60
- plt .show ()
61
+ # plt.show()
0 commit comments