Ian -- legend tends to take the best upper-right position, while textbp looks for the best lower-left position. If your plot is fairly dense with data, they may decide on the same spot. textbp only pays attention to the data, it doesn't know where the legend is placed.
Alireza -- this is hard to debug without the error message. I'm going to guess that you put it somewhere where it's not in your path. Try "which textbp" or "path".