This post discusses Apache log visualization with Matplotlib library.
First, download the data file used in this example [hide_from_apps container="span"]from here.[/hide_from_apps][show_only_in_apps]from here.[/show_only_in_apps]
We will require numpy and matplotlib
import numpy as np
import matplotlib.pyplot as plt
numpy.loadtext() can directly load a text file in an array
requests-idevji.txt contains only hour on which request was made, this is achieved by pre-prcoessing the Apache log.
data = np.loadtxt ('requests-idevji.txt')
We need 24 bins because we have 24 hours' data. For other attributes of hist() see reference