maxnnz plotting scripts improved