added the code for generating overlapped graphs.