add legend

pull/51/head
Déborah Servili 2017-02-03 16:34:50 +01:00
parent 03089ea7da
commit a4f90a7ac1
1 changed files with 2 additions and 2 deletions

View File

@ -14,13 +14,13 @@ def tagsDistributionScatterPlot(NbTags, dates, plotname='Tags Distribution Plot'
glyphs = {}
desc = {}
hover = HoverTool()
plot = figure(plot_width=800, plot_height=800, x_axis_type="datetime", tools=[hover])
plot = figure(plot_width=800, plot_height=800, x_axis_type="datetime", x_axis_label='Date', y_axis_label='Number of tags', tools=[hover])
for name in NbTags.keys():
desc[name] = []
for date in dates[name]:
desc[name].append(date_tools.datetimeToString(date, "%Y-%m-%d"))
counts[name] = plot.circle(dates[name], NbTags[name], source=ColumnDataSource(
counts[name] = plot.circle(dates[name], NbTags[name], legend="Number of events with y tags", source=ColumnDataSource(
data=dict(
desc=desc[name]
)