Flowchart Symbols

schemdraw provides basic flowcharting abilities. The schemdraw.flow module contains a set of functions for defining flowchart blocks that can be added to schemdraw Drawings.

from schemdraw import flow

Flowchart blocks:

../_images/flow_1_0.svg
class schemdraw.flow.Square(w=3, h=2)

Flowchart square

Parameters
  • w – width

  • h – height

class schemdraw.flow.Subroutine(w=3.5, h=2, s=.3)

Flowchart subprocess box (box with extra vertical lines)

Parameters
  • w – width

  • h – height

  • s – spacing of side lines

class schemdraw.flow.Data(w=3, h=2, s=.5)

Flowchart data or I/O block (parallelogram)

Parameters
  • w – width

  • h – height

  • s – slant of parallelogram

class schemdraw.flow.Start(w=3, h=2)

Flowchart start block (oval)

Parameters
  • w – width

  • h – height

class schemdraw.flow.Connect(r=0.75)

Flowchart connect block (circle)

Parameters

r – radius

class schemdraw.flow.Decision(w=4, h=2, **kwargs)

Flowchart decision block (diamond)

Parameters
  • w – width

  • h – height

  • N – Label for North/Top point of diamond

  • E – Label for East/Right point of diamond

  • S – Label for South/Bottom point of diamond

  • W – Label for West/Left point of diamond

All flowchart symbols have four anchors named ‘N’, ‘S’, ‘E’, and ‘W’ for the four directions. The schemdraw.elements.intcircuits.Ic element can be used with the flowchart elements to create blocks with multiple inputs/outputs per side if needed.

Flowchart elements must be connected with Line, or Arrow, elements. The w and h parameters must be manually specified to size each block to fit any labels.

Decisions

To label the decision branches, the schemdraw.flow.Eecision element takes keyword arguments for each cardinal direction. For example:

decision = flow.Decision(W='Yes', E='No', S='Maybe', label='Question?')
../_images/flow_4_0.svg

See the Flowcharting Gallery for more examples.