Skip to content

Commit

Permalink
Update WorkflowPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Oct 30, 2023
1 parent 7869762 commit e5480c0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/SimpleWorkflowRecipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,24 @@ end

@userplot WorkflowPlot
@recipe function f(
plot::WorkflowPlot; edgewidth=2, edgestrokecolor=:black, nodeshape=:circle, nodesize=5
plot::WorkflowPlot;
edgewidth=1,
edgestrokecolor=:black,
nodeshape=:circle,
nodesize=5,
root=:left,
)
if root == :right
# FIXME
elseif root == :bottom
permute --> (:x, :y)
elseif root == :top
# FIXME
elseif root == :left
# do nothing
else
throw(ArgumentError("unknown root `$root`!"))
end
workflow = only(plot.args)
framestyle --> :none
grid --> false
Expand All @@ -36,6 +52,7 @@ end
edge_x, edge_y = paths[edge]
@series begin
seriestype --> :path
arrow --> true
linewidth --> edgewidth
linecolor --> edgestrokecolor
edge_x, edge_y
Expand All @@ -48,6 +65,7 @@ end
markersize --> nodesize
markerstrokewidth --> 0
seriescolor --> getcolor(getstatus(job))
series_annotations --> string(only(indexin(job, workflow)))
Base.vect(x), Base.vect(y)
end
end
Expand Down

0 comments on commit e5480c0

Please sign in to comment.