matplotlib - Python - Adding marker option to plot gives error -
hi i'm trying add markers python plots using mark every option. when add following error: valueerror: many values unpack. i'm not sure causing it. below code.
temp = pd.read_csv(path+filename) temp=pd.dataframe(temp).convert_objects(convert_numeric=true) fig,axes = plt.subplots(nrows=2,ncols=1) fig.subplots_adjust(hspace=1) fig = plt.figure() markers_on=[887,1661,2631,3406,4714,5606,6880,8332,9751] fig.subplots_adjust(hspace=.5) fig.suptitle('bc attributes', fontsize=12) plt.subplot(3,1,1) plt.plot(temp.index,temp.bc_t_node0_cpu0_temp, marker='s', markevery=[887,1661,2631,3406,4714,5606,6880,8332,9751]) plt.xlabel('time') plt.ylabel('node0 cpu0 temp') plt.subplot(3,1,2) plt.plot(temp.index, temp.bc_t_node0_cpu1_temp, marker='s', markevery=[887,1661,2631,3406,4714,5606,6880,8332,9751]) plt.xlabel('time') plt.ylabel('node0 cpu1 temp') plt.subplot(3,1,3) plt.plot(temp.index, temp.bc_t_node1_cpu0_temp) plt.xlabel('time') plt.ylabel('node1 cpu0 temp') final_path="plots/cd/" fig.savefig(final_path+filename+'_1.png') plt.close(fig) plt.show()
Comments
Post a Comment