Example of plotting histogram based on message frequency