r342: Added histogram plotting