changed plotting mechanism in examples