Can someone explain the following error in my python code?
Seems that remove border is not defined. You have to define the function before used. 

I do not know where the string error comes, is not clear to me. If you post the full traceback it will be clearer. 

Finally your label is not show because you have to call the method plt.legend()