update to graph
This commit is contained in:
parent
cbfaf1322c
commit
12ce8a5e22
1 changed files with 8 additions and 3 deletions
|
@ -74,11 +74,16 @@ gd = @chain mod_df begin
|
|||
:train_code = levelcode(:train)
|
||||
end
|
||||
end
|
||||
|
||||
colors = cgrad(:Dark2_6)
|
||||
f = Figure();
|
||||
ax = Axis(f[1,1], xlabel = "Station", ylabel = "Mean Delay (mins)", title = "Mean Delay by Station", xticks = (1:length(levels(gd.station_code)), levels(gd.station)), xticklabelrotation = pi/2)
|
||||
barplot!(ax, gd.station_code, gd.mean, dodge = gd.train_code, color = gd.train_code)
|
||||
barplot!(ax, gd.station_code, gd.mean, dodge = gd.train_code, color = colors[gd.train_code])
|
||||
|
||||
labels = ["$i" for i in unique(gd.train)]
|
||||
elements = [PolyElement(polycolor = colors[i]) for i in unique(gd.train_code)]
|
||||
|
||||
Legend(f[1,2],elements, labels, "Train Number")
|
||||
|
||||
|
||||
f
|
||||
|
||||
levels(gd.station_code)
|
Loading…
Reference in a new issue