merge pcolor functionality