refined plotting functions