def plot_one_day(x, y, xlabel=None, ylabel=None, title=None, ylim=None):
    """时间跨度为一天。
    
    major tick = every hours
    minor tick = every 15 minutes
    """
    plt.close("all")
    
    fig = plt.figure(figsize=(20, 10))
    ax = fig.add_subplot(111)
    ax.plot(x, y)
    
    hours = HourLocator(range(24))
    hoursFmt = DateFormatter("%H:%M")
    minutes = MinuteLocator([30,])
    minutesFmt = DateFormatter("%M")
    
    ax.xaxis.set_major_locator(hours)
    ax.xaxis.set_major_formatter(hoursFmt)
    ax.xaxis.set_minor_locator(minutes)
    ax.xaxis.set_minor_formatter(minutesFmt)
    
    ax.autoscale_view()
    ax.grid()
    plt.setp( ax.xaxis.get_majorticklabels(), rotation=90 )
    plt.setp( ax.xaxis.get_minorticklabels(), rotation=90 )
    
    if xlabel:
        plt.xlabel(xlabel)
    else:
        plt.xlabel("Time")
        
    if ylabel:
        plt.ylabel(ylabel)
    else:
        plt.ylabel("Value")
        
    if title:
        plt.title(title)
    else:
        plt.title(str(x[0].date()))
    
    if ylim:
        plt.ylim(ylim)
    else:
        plt.ylim([min(y) - (max(y) - min(y) ) * 0.05, 
                  max(y) + (max(y) - min(y) ) * 0.05])
    
    return plt, ax