Skip to content

Commit c728689

Browse files
committed
forgot to merge options in plot.jl base helpers
1 parent 5593a30 commit c728689

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/plot.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ function get_points(f::Function, options=Dict())
2020
end
2121
end
2222

23-
scatter(f::Array, options=Dict()) = {"type"=>"scatter","mode"=>"markers", "x"=>[1:length(f)], "y"=>f}
24-
line(f::Array, options=Dict()) = {"type"=>"scatter","mode"=>"lines", "x"=>[1:length(f)], "y"=>f}
25-
box(f::Array, options=Dict()) = {"type"=>"box", "x"=>[1:length(f)], "y"=>f}
26-
histogram(f::Array, options=Dict()) = {"type"=>"histogram", "y"=>[1:length(f)], "x"=>f}
27-
bar(f::Array, options=Dict()) = {"type"=>"bar", "x"=>[1:length(f)], "y"=>f}
28-
29-
scatter(f::Dict, options=Dict()) = {"type"=>"scatter","mode"=>"markers", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}
30-
line(f::Dict, options=Dict()) = {"type"=>"scatter","mode"=>"lines", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}
31-
box(f::Dict, options=Dict()) = {"type"=>"box", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}
32-
histogram(f::Dict, options=Dict()) = {"type"=>"histogram", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}
33-
bar(f::Dict, options=Dict()) = {"type"=>"bar", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}
23+
scatter(f::Array, options=Dict()) = merge({"type"=>"scatter","mode"=>"markers", "x"=>[1:length(f)], "y"=>f}, options)
24+
line(f::Array, options=Dict()) = merge({"type"=>"scatter","mode"=>"lines", "x"=>[1:length(f)], "y"=>f}, options)
25+
box(f::Array, options=Dict()) = merge({"type"=>"box", "x"=>[1:length(f)], "y"=>f}, options)
26+
histogram(f::Array, options=Dict()) = merge({"type"=>"histogram", "y"=>[1:length(f)], "x"=>f}, options)
27+
bar(f::Array, options=Dict()) = merge({"type"=>"bar", "x"=>[1:length(f)], "y"=>f}, options)
28+
29+
scatter(f::Dict, options=Dict()) = merge({"type"=>"scatter","mode"=>"markers", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}, options)
30+
line(f::Dict, options=Dict()) = merge({"type"=>"scatter","mode"=>"lines", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}, options)
31+
box(f::Dict, options=Dict()) = merge({"type"=>"box", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}, options)
32+
histogram(f::Dict, options=Dict()) = merge({"type"=>"histogram", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}, options)
33+
bar(f::Dict, options=Dict()) = merge({"type"=>"bar", "x"=>[k for k in sort(collect(keys(f)))], "y"=>[f[k] for k in sort(collect(keys(f)))]}, options)
3434

3535
scatter(f::Function, options=Dict()) = get_points(f, merge({"type"=>"scatter","mode"=>"markers"}, options))
3636
line(f::Function, options=Dict()) = get_points(f, merge({"type"=>"scatter","mode"=>"lines"}, options))

0 commit comments

Comments
 (0)