other_index = [('Biorefinery', 'Steam demand'),
               ('Biorefinery', 'Ethanol production'),
               ('Biorefinery', 'Minimum ethanol selling price')]
other_data = np.array(data[other_index])
other_data[:, 0] *= 100. / 234784.
other_data[:, 1] *= 100. / 22273.
other_data[:, 2] *= 100. / 2.15
bx_other = plot_montecarlo(other_data,
                           colors.blue_tint.RGBn,
                           colors.blue_shade.RGBn,
                           positions_other,
                           transpose=False)

# %% Plot electricity

plot_vertical_line(15.5, color=colors.grey_tint.RGBn)
positions_electricity = tuple(range(9))
areas = [f'Area {i}00' for i in nums]
units = 'MW'
positions = np.arange(0, 9)
electricity_cols = [(i, 'Electricity') for i in areas]
humbird_electricity = 41 * np.array(
    (0.02, 0.14, 0.06, 0.05, 0.18, 0.003, 0.03, 0.08, 0.44))
electricity_data = data[electricity_cols]  #/ humbird_electricity
# electricity_data[('Consumed', 'Electricity')] = electricity_data.sum(1)
electricity_data[(
    'Biorefinery',
    'Excess electricity')] = data[('Biorefinery', 'Excess electricity')] / 1000
electricity_data_humbird_normalized = electricity_data * (100 /
                                                          humbird_electricity)
bx_electricity = plot_montecarlo(electricity_data_humbird_normalized,
              dy=150,
              dy_text=20,
              position='over',
              color=colors.yellow_shade.RGBn)

# Plot sugarcane values and SuperPro values
x_superpro = [0, 2, 5, 10]
data_sc = pd.read_excel('Monte Carlo sugarcane.xlsx', header=[0, 1])
get_metric = lambda name: np.asarray(data_sc['Biorefinery', name]).flatten()

# IRR
plt.sca(IRR_ax)
plot_single_points(x_superpro, [13.5, 13.7, 15.2, 17.5])
IRR = get_metric('Internal rate of return [%]') * 100  # To percent
plot_montecarlo(IRR)
plot_vertical_line(1)
IRR_ub = 30
plt.ylim(0, IRR_ub)
IRR_yticks = np.arange(0, 31, 30 / 5)
plt.yticks(IRR_yticks)
set_x_axis(False)
y_text = 0.85 * IRR_ub
plt.text(0.05,
         y_text,
         "A",
         color=colors.neutral_shade.RGBn,
         horizontalalignment='center',
         fontsize=14,
         fontweight='bold')

# TCI