Make sure plot functions use correct number of samples