Exemplo n.º 1
0
for vehicle in sorted_dict:
    group_names.append(vehicle)
    y_values.append(sorted_dict[vehicle])

#####################################
# begin the matplotlib section
#####################################

# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("mode")
Exemplo n.º 2
0
for vehicle in sorted_dict:
    group_names.append(vehicle)
    y_values.append(sorted_dict[vehicle])

#####################################
# begin the matplotlib section
#####################################

# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("vehicle_type")
Exemplo n.º 3
0
for vehicle in sorted_dict:
    group_names.append(vehicle)
    y_values.append(sorted_dict[vehicle])

#####################################
# begin the matplotlib section
#####################################

# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("mode_injured")
Exemplo n.º 4
0
for vehicle in sorted_dict:
    group_names.append(vehicle)
    y_values.append(sorted_dict[vehicle])

#####################################
# begin the matplotlib section
#####################################

# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("mode_fatal")
    group_names.append(item[0])



#####################################
# begin the matplotlib section
#####################################

# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("violations")
Exemplo n.º 6
0
    group_names.append(vehicle)
    y_values.append(sorted_dict[vehicle])

#####################################
# begin the matplotlib section
#####################################


# create the figure and chart
fig = pylab.figure(figsize=settings.figsize)
ax = fig.add_subplot(1,1,1)

# create manual index for the causes, this is the x axis
N = len(y_values)
ind = range(N)

# bind the data to the graphic
ax.bar(ind, y_values, facecolor=settings.bar_color, width=0.8, align='center')

# configure the labels
ax.set_ylabel(y_label, fontsize=settings.font_size)
ax.set_title(title, fontstyle='oblique', fontsize=settings.font_size)
ax.set_xticks(ind)
ax.set_xticklabels(group_names)
for tick in ax.xaxis.get_major_ticks():
    tick.label1.set_fontsize(settings.font_size_labels)
fig.autofmt_xdate()

# kick it off!
utils.kick_it_off("cause")