@@ -20,10 +20,21 @@ function get_points(f::Function, options=Dict())
2020 end
2121end
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" , " x" => [1 : length (f)], " y" => f}
27+
28+ scatter (f:: Dict , options= Dict ()) = {" type" => " scatter" ," mode" => " markers" , " x" => [k for k in keys (f)], " y" => [v for v in Base. values (f)]}
29+ line (f:: Dict , options= Dict ()) = {" type" => " scatter" ," mode" => " lines" , " x" => [k for k in keys (f)], " y" => [v for v in Base. values (f)]}
30+ box (f:: Dict , options= Dict ()) = {" type" => " box" , " x" => [k for k in keys (f)], " y" => [v for v in Base. values (f)]}
31+ histogram (f:: Dict , options= Dict ()) = {" type" => " histogram" , " x" => [k for k in keys (f)], " y" => [v for v in Base. values (f)]}
32+
2333scatter (f:: Function , options= Dict ()) = get_points (f, merge ({" type" => " scatter" ," mode" => " markers" }, options))
2434line (f:: Function , options= Dict ()) = get_points (f, merge ({" type" => " scatter" ," mode" => " lines" }, options))
2535box (f:: Function , options= Dict ()) = get_points (f, merge ({" type" => " box" }, options))
2636histogram (f:: Function , options= Dict ()) = get_points (f, merge ({" type" => " histogram" }, options))
37+
2738plot (f:: Function , options= Dict ()) = plot ([line (f, options)])
2839plot (fs:: Array{Function,1} , options= Dict ()) = plot ([line (f, options) for f in fs])
2940
0 commit comments