graphcode and sqldata_notmain generate the plots