fdoc

subroutinedraw_graphprivate

subroutine draw_graph(p, s, relation, job, keep, w, drawing, description, failed)

Lay out and draw one graph.

Arguments

NameTypeIntentAttributesDescription
ptype(project_t)in

the project

stype(settings_t)in

the settings

relationtype(adjacency_t)in

the relation

jobtype(graph_job_t)in

the graph

keeplogicalin

whether to give the description too

wtype(walk_t)inout

the working space

drawingtype(string_t)inout

the drawing

descriptiontype(string_t)inout

the description, with keep

failedlogicalout

whether the layout failed

Calls

Source

Show the code
subroutine draw_graph(p, s, relation, job, keep, w, drawing, description, failed)
    type(project_t), intent(in) :: p            !! the project
    type(settings_t), intent(in) :: s           !! the settings
    type(adjacency_t), intent(in) :: relation   !! the relation
    type(graph_job_t), intent(in) :: job        !! the graph
    logical, intent(in) :: keep                 !! whether to give the description too
    type(walk_t), intent(inout) :: w            !! the working space
    type(string_t), intent(inout) :: drawing    !! the drawing
    type(string_t), intent(inout) :: description    !! the description, with `keep`
    logical, intent(out) :: failed              !! whether the layout failed
    type(layout_t) :: g
    logical :: found
    integer :: status

    failed = .false.
    call describe_graph(p, s, relation, job, w, g, found)
    if (.not. found) return
    if (keep) call g%write_dot(description%s)
    call g%layout(status)
    failed = status /= FDOT_OK
    if (.not. failed) call g%write_svg(drawing%s)
end subroutine draw_graph

Graphs

Calls

Called by