I want to update the "label"/legend parameter dynamically. It will be an integer variable coming from a function. I want the label to change every time that value in the function changes.
so i want it to say alpha = some int variable
plt.plot(vals, smpl_sz, 'b', marker = 'o', label='alpha='**some value that updates**)
plt.plot(val2, smpl_sz2, 'g', marker = 'o', label = 'alpha='**some value that updates** )
plt.title('Power vs Sample Size')
plt.xlabel('Power')
plt.ylabel('Sample Size')
plt.legend(loc = "lower right")