Refreshing histogram periodically