used generic plort function for N plot too
tidying
fizing underoder function name cal problem
addig legends
removing code now in examplea nd updating heaser