I built a graph according to the dictionary data.
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
TNRACG_T_OLD= {'need1': 27, 'need2': 36}
plt.bar(range(len(TNRACG_T_OLD)), TNRACG_T_OLD.values(), align='center', color='b', label="TNRACG_T_OLD")
plt.xticks(range(len(TNRACG_T_OLD)), TNRACG_T_OLD.keys())
plt.legend(bbox_to_anchor=(1.45, 1), ncol=1)
plt.ylabel(u'Costs of meeting needs,')
plt.xlabel(u'Name of needs')
plt.show()
TNRCG_T_OLD= {'need1': 120, 'need2': 72}
plt.bar(range(len(TNRCG_T_OLD)), TNRCG_T_OLD.values(), align='center', color='b', label="TNRCG_T_OLD")
plt.xticks(range(len(TNRCG_T_OLD)), TNRCG_T_OLD.keys())
plt.legend(bbox_to_anchor=(1.45, 1), ncol=1)
plt.ylabel(u'Costs of meeting needs,')
plt.xlabel(u'Name of needs')
plt.show()
The default graphics are placed to the right one column.
What to fix in the code of the program, so that the graphs are placed in two columns. As shown below.