adding qc, qr, nc, nr to plotting