new routines to plot signal