Electrical Elements¶
Two-Terminal Elements¶
Two-terminal element definitions
- class schemdraw.elements.twoterm.Breaker(*d, dots: bool = True, **kwargs)¶
Circuit breaker
- Parameters:
dots – Show connection dots
- class schemdraw.elements.twoterm.CPE(*d, **kwargs)¶
Constant Phase Element
- class schemdraw.elements.twoterm.Capacitor(flat plates)¶
- Parameters:
polar – Add polarity + sign
- class schemdraw.elements.twoterm.Capacitor2(*d, polar: bool = False, **kwargs)¶
Capacitor (curved bottom plate)
- Parameters:
polar – Add polarity + sign
- class schemdraw.elements.twoterm.CapacitorTrim(*d, **kwargs)¶
Trim capacitor
- class schemdraw.elements.twoterm.CapacitorVar(*d, **kwargs)¶
Variable capacitor
- class schemdraw.elements.twoterm.Crystal(*d, **kwargs)¶
Crystal oscillator
- class schemdraw.elements.twoterm.CurrentMirror(*d, **kwargs)¶
Current mirror with optional common terminal
- Anchors:
scommon
- class schemdraw.elements.twoterm.Diac(*d, **kwargs)¶
Diac (diode for alternating current)
- class schemdraw.elements.twoterm.Diode(*d, **kwargs)¶
- class schemdraw.elements.twoterm.DiodeShockley(*d, **kwargs)¶
Shockley Diode
- class schemdraw.elements.twoterm.DiodeTunnel(*d, **kwargs)¶
Tunnel Diode
- class schemdraw.elements.twoterm.FuseIEC(*d, **kwargs)¶
Fuse (IEC Style)
- class schemdraw.elements.twoterm.FuseIEEE(*d, **kwargs)¶
Fuse (IEEE Style)
- class schemdraw.elements.twoterm.FuseUS(*d, dots: bool = True, **kwargs)¶
Fuse (U.S. Style)
- Parameters:
dots – Show dots on connections to fuse
- class schemdraw.elements.twoterm.Inductor(*d, **kwargs)¶
- class schemdraw.elements.twoterm.Inductor2(*d, loops: int = 4, **kwargs)¶
Inductor, drawn as cycloid (loopy)
- Parameters:
loops – Number of inductor loops
- class schemdraw.elements.twoterm.Josephson(*d, **kwargs)¶
Josephson Junction
- class schemdraw.elements.twoterm.LED(*d, **kwargs)¶
Light emitting diode
- class schemdraw.elements.twoterm.LED2(*d, **kwargs)¶
Light emitting diode (curvy light lines)
- class schemdraw.elements.twoterm.Memristor(*d, **kwargs)¶
Memristor (resistor with memory)
- class schemdraw.elements.twoterm.Memristor2(*d, **kwargs)¶
Memristor (resistor with memory), alternate style
- class schemdraw.elements.twoterm.Norator(*args, **kwargs)¶
- class schemdraw.elements.twoterm.Nullator(*args, **kwargs)¶
This element does not support filling
- class schemdraw.elements.twoterm.Photodiode(*d, **kwargs)¶
Photo-sensitive diode
- schemdraw.elements.twoterm.Photoresistor¶
alias of
PhotoresistorIEEE
- schemdraw.elements.twoterm.PhotoresistorBox¶
alias of
PhotoresistorIEC
- class schemdraw.elements.twoterm.PhotoresistorIEC(*d, **kwargs)¶
Photo-resistor (European style)
- class schemdraw.elements.twoterm.PhotoresistorIEEE(*d, **kwargs)¶
Photo-resistor (U.S. style)
- schemdraw.elements.twoterm.PotBox¶
alias of
PotentiometerIEC
- schemdraw.elements.twoterm.Potentiometer¶
alias of
PotentiometerIEEE
- class schemdraw.elements.twoterm.PotentiometerIEC(*d, **kwargs)¶
Potentiometer (European style)
- Anchors:
tap
- class schemdraw.elements.twoterm.PotentiometerIEEE(*d, **kwargs)¶
Potentiometer (U.S. style)
- Anchors:
tap
- schemdraw.elements.twoterm.RBox¶
alias of
ResistorIEC
- schemdraw.elements.twoterm.RBoxVar¶
alias of
ResistorVarIEC
- schemdraw.elements.twoterm.Resistor¶
alias of
ResistorIEEE
- class schemdraw.elements.twoterm.ResistorIEC(*d, **kwargs)¶
Resistor as box (IEC/European style)
- class schemdraw.elements.twoterm.ResistorIEEE(*d, **kwargs)¶
Resistor (IEEE/U.S. style)
- schemdraw.elements.twoterm.ResistorVar¶
alias of
ResistorVarIEEE
- class schemdraw.elements.twoterm.ResistorVarIEC(*d, **kwargs)¶
Variable resistor (European style)
- class schemdraw.elements.twoterm.ResistorVarIEEE(*d, **kwargs)¶
Variable resistor (U.S. style)
- class schemdraw.elements.twoterm.Rshunt(*d, **kwargs)¶
Shunt Resistor
- class schemdraw.elements.twoterm.SCR(*d, **kwargs)¶
Silicon controlled rectifier (or thyristor)
- Anchors:
gate
- class schemdraw.elements.twoterm.Schottky(*d, **kwargs)¶
Schottky Diode
- class schemdraw.elements.twoterm.SparkGap(*d, **kwargs)¶
Spark Gap
- class schemdraw.elements.twoterm.Thermistor(*d, **kwargs)¶
- class schemdraw.elements.twoterm.Triac(*d, **kwargs)¶
- Anchors:
gate
- class schemdraw.elements.twoterm.Varactor(*d, **kwargs)¶
Varactor Diode/Varicap/Variable Capacitance Diode
- class schemdraw.elements.twoterm.VoltageMirror(*d, **kwargs)¶
Voltage mirror with optional common terminal
This element does not support filling
- Anchors:
scommon
- class schemdraw.elements.twoterm.Zener(*d, **kwargs)¶
Zener Diode
Sources, meters, and lamp elements
- class schemdraw.elements.sources.Battery(*d, **kwargs)¶
- class schemdraw.elements.sources.BatteryCell(*d, **kwargs)¶
Cell
- class schemdraw.elements.sources.Lamp(*d, **kwargs)¶
Incandescent Lamp
- class schemdraw.elements.sources.Lamp2(*d, **kwargs)¶
Incandescent Lamp (with X through a Source)
- class schemdraw.elements.sources.MeterA(*d, **kwargs)¶
Ammeter
- class schemdraw.elements.sources.MeterI(*d, **kwargs)¶
Current Meter (I)
- class schemdraw.elements.sources.MeterOhm(*d, **kwargs)¶
Ohm meter
- class schemdraw.elements.sources.MeterV(*d, **kwargs)¶
Volt meter
- class schemdraw.elements.sources.Neon(*d, **kwargs)¶
Neon bulb
- class schemdraw.elements.sources.Solar(*d, **kwargs)¶
Solar source
- class schemdraw.elements.sources.Source(*d, **kwargs)¶
Generic source element
- class schemdraw.elements.sources.SourceControlled(*d, **kwargs)¶
Generic controlled source
- class schemdraw.elements.sources.SourceControlledI(*d, **kwargs)¶
Controlled current source
- class schemdraw.elements.sources.SourceControlledV(*d, **kwargs)¶
Controlled voltage source
- class schemdraw.elements.sources.SourceI(*d, **kwargs)¶
Current source
- class schemdraw.elements.sources.SourcePulse(*d, **kwargs)¶
Pulse source
- class schemdraw.elements.sources.SourceRamp(*d, **kwargs)¶
Ramp/sawtooth source
- class schemdraw.elements.sources.SourceSin(*d, **kwargs)¶
Source with sine
- class schemdraw.elements.sources.SourceSquare(*d, **kwargs)¶
Square wave source
- class schemdraw.elements.sources.SourceTriangle(*d, **kwargs)¶
Triangle source
- class schemdraw.elements.sources.SourceV(*d, **kwargs)¶
Voltage source
One-terminal Elements¶
One terminal element definitions
- class schemdraw.elements.oneterm.Antenna(*d, **kwargs)¶
- class schemdraw.elements.oneterm.AntennaLoop(*d, **kwargs)¶
Loop antenna (diamond style)
- class schemdraw.elements.oneterm.AntennaLoop2(*d, **kwargs)¶
Loop antenna (square style)
- class schemdraw.elements.oneterm.Ground(*d, lead: bool = True, **kwargs)¶
Ground connection
- class schemdraw.elements.oneterm.GroundChassis(*d, lead: bool = True, **kwargs)¶
Chassis ground
- class schemdraw.elements.oneterm.GroundSignal(*d, lead: bool = True, **kwargs)¶
Signal ground
- class schemdraw.elements.oneterm.NoConnect(**kwargs)¶
No Connection
- class schemdraw.elements.oneterm.Vdd(*d, lead: bool = True, **kwargs)¶
Vdd connection
- class schemdraw.elements.oneterm.Vss(*d, lead: bool = True, **kwargs)¶
Vss connection
Switches¶
Switches and buttons
- class schemdraw.elements.switches.Button(*d, nc: bool = False, **kwargs)¶
Push button switch
- Parameters:
nc – Normally closed
- class schemdraw.elements.switches.Switch(*d, action: Literal['open', 'close'] | None = None, **kwargs)¶
Toggle Switch
- Parameters:
action – action arrow (‘open’ or ‘close’)
- class schemdraw.elements.switches.SwitchDIP(*d, n: int = 3, pattern: Sequence[bool] | None = None, switchcolor: str = '#333333', swidth: float = 0.4, spacing: float = 0.2, **kwargs)¶
DIP switch
- Parameters:
n – Number of switches
pattern – Boolean sequence indicating whether each switch is flipped up or down
switchcolor – Fill color for flipped switches
swidth – Width of one switch
spacing – Spacing between switches
- class schemdraw.elements.switches.SwitchDpdt(*d, link: bool = True, **kwargs)¶
Double-pole double-throw switch
- Parameters:
link – Show dotted line linking switch levers
- Anchors:
p1
p2
t1
t2
t3
t4
- class schemdraw.elements.switches.SwitchDpst(*d, link: bool = True, **kwargs)¶
Double-pole single-throw switch
- Parameters:
link – Show dotted line linking switch levers
- Anchors:
p1
p2
t1
t2
- class schemdraw.elements.switches.SwitchReed(*d, **kwargs)¶
Reed Switch
- class schemdraw.elements.switches.SwitchRotary(*d, n: int = 4, dtheta: float | None = None, theta0: float | None = None, radius: float = 1, arrowlen: float = 0.75, arrowcontact: int = 0, **kwargs)¶
Rotary Switch
- Parameters:
n – number of contacts
dtheta – angle in degrees between each contact
theta0 – angle in degrees of first contact
radius – radius of switch
arrowlen – length of switch arrow
arrowcontact – index of contact to point to
Values for dtheta and theta will be calculated based on n if not provided.
- Anchors:
P
T[x] for each contact (starting at 1)
- class schemdraw.elements.switches.SwitchSpdt(*d, action: Literal['open', 'close'] | None = None, **kwargs)¶
Single-pole double throw switch.
- Parameters:
action – action arrow (‘open’ or ‘close’)
- Anchors:
a
b
c
- class schemdraw.elements.switches.SwitchSpdt2(*d, action: Literal['open', 'close'] | None = None, **kwargs)¶
Single-pole double throw switch, throws above and below.
- Parameters:
action – action arrow (‘open’ or ‘close’)
- Anchors:
a
b
c
Lines¶
Lines, Arrows, and Labels
- class schemdraw.elements.lines.Annotate(k=0.75, th1=75, th2=180, arrow='<-', arrowlength=0.25, arrowwidth=0.2, **kwargs)¶
Draw a curved arrow pointing to at position, ending at to position, with label location at the tail of the arrow (See also Arc3).
- Parameters:
k – Control point factor. Higher k means tighter curve.
th1 – Angle at which the arc leaves start point
th2 – Angle at which the arc leaves end point
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’
arrowlength – Length of arrowhead
arrowwidth – Width of arrowhead
- class schemdraw.elements.lines.Arc2(k=0.5, arrow=None, **kwargs)¶
Arc Element
Use at and to methods to define endpoints.
Arc2 is a quadratic Bezier curve with control point halfway between the endpoints, generating a symmetric ‘C’ curve.
- Parameters:
k – Control point factor. Higher k means more curvature.
- Anchors:
start end ctrl mid
- class schemdraw.elements.lines.Arc3(k=0.75, th1=0, th2=180, arrow=None, arrowlength=0.25, arrowwidth=0.2, **kwargs)¶
Arc Element
Use at and to methods to define endpoints.
Arc3 is a cubic Bezier curve. Control points are set to extend the curve at the given angle for each endpoint.
- Parameters:
k – Control point factor. Higher k means tighter curve.
th1 – Angle at which the arc leaves start point
th2 – Angle at which the arc leaves end point
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’
arrowlength – Length of arrowhead
arrowwidth – Width of arrowhead
- Anchors:
start end center ctrl1 ctrl2
- class schemdraw.elements.lines.ArcLoop(radius: float = 0.6, arrow: str | None = None, arrowlength=0.25, arrowwidth=0.2, **kwargs)¶
Loop Arc
Use at and to methods to define endpoints.
ArcLoop is an arc drawn as part of a circle.
- Parameters:
radius – Radius of the arc
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’ arrowlength: Length of arrowhead
arrowwidth – Width of arrowhead
- Anchors:
start end mid BL BR TL TR
- delta(dx: float = 0, dy: float = 0)¶
Specify ending position relative to start position
- class schemdraw.elements.lines.ArcN(k=0.75, arrow=None, arrowlength=0.25, arrowwidth=0.2, **kwargs)¶
N-Curve Arc
Use at and to methods to define endpoints.
ArcN approaches the endpoints vertically, leading to a ‘N’ shaped curve
- Parameters:
k – Control point factor. Higher k means tighter curve.
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’ arrowlength: Length of arrowhead
arrowwidth – Width of arrowhead
- class schemdraw.elements.lines.ArcZ(k=0.75, arrow=None, arrowlength=0.25, arrowwidth=0.2, **kwargs)¶
Z-Curve Arc
Use at and to methods to define endpoints.
ArcZ approaches the endpoints horizontally, leading to a ‘Z’ shaped curve
- Parameters:
k – Control point factor. Higher k means tighter curve.
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’ arrowlength: Length of arrowhead
arrowwidth – Width of arrowhead
- class schemdraw.elements.lines.Arrow(*d, double: bool = False, headwidth: float = 0.15, headlength: float = 0.25, **kwargs)¶
- Parameters:
double – Show arrowhead on both ends
headwidth – Width of arrow head
headlength – Length of arrow head
- class schemdraw.elements.lines.Arrowhead(*d, headwidth: float = 0.15, headlength: float = 0.25, **kwargs)¶
- class schemdraw.elements.lines.CurrentLabel(ofst: float = 0.4, length: float = 2, top: bool = True, reverse: bool = False, headlength: float = 0.3, headwidth: float = 0.2, **kwargs)¶
Current label arrow drawn above an element
Use .at() method to place the label over an existing element.
- Parameters:
ofst – Offset distance from centerline of element
length – Length of the arrow
top – Draw arrow on top or bottom of element
reverse – Reverse the arrow direction
headlength – Length of arrowhead
headwidth – Width of arrowhead
- class schemdraw.elements.lines.CurrentLabelInline(direction: Literal['in', 'out'] = 'in', ofst: float = 0.8, start: bool = True, headlength: float = 0.3, headwidth: float = 0.3, **kwargs)¶
Current direction arrow, inline with element.
Use .at() method to place arrow on an Element instance
- Parameters:
direction – arrow direction ‘in’ or ‘out’ of element
ofst – Offset along lead length
start – Arrow at start or end of element
headlength – Length of arrowhead
headwidth – Width of arrowhead
- class schemdraw.elements.lines.DataBusLine(*d, **kwargs)¶
Straight Line with bus indication stripe
- class schemdraw.elements.lines.Dot(*d, radius: float = 0.075, open: bool = False, **kwargs)¶
Connection Dot
- Parameters:
radius – Radius of dot
open – Draw as an open circle
- class schemdraw.elements.lines.DotDotDot(*d, radius: float = 0.075, open: bool = False, **kwargs)¶
Ellipsis element
- Parameters:
radius – Radius of dots
open – Draw dots as open circles
“Ellipsis” is a reserved keyword in Python used for slicing, thus the name DotDotDot.
- class schemdraw.elements.lines.Encircle(elm_list: Sequence[Element] | None = None, padx: float = 0.2, pady: float = 0.2, includelabels: bool = True, **kwargs)¶
Draw ellipse around all elements in the list
- Parameters:
elm_list – List of elements to enclose
padx – Horizontal distance from elements to loop
pady – Vertical distance from elements to loop
includelabels – Include labesl in the ellipse
- class schemdraw.elements.lines.EncircleBox(elm_list: Sequence[Element] | None = None, cornerradius: float = 0.3, padx: float = 0.2, pady: float = 0.2, includelabels: bool = True, **kwargs)¶
Draw rounded box around all elements in the list
- Parameters:
elm_list – List elements to enclose
cornerraidus – radius of corner rounding
padx – Horizontal distance from elements to loop
pady – Vertical distance from elements to loop
includelabels – Include labels in the box
- class schemdraw.elements.lines.Gap(*d, **kwargs)¶
Gap for labeling port voltages, for example. Draws nothing, but provides place to attach a label such as (‘+’, ‘V’, ‘-‘).
- class schemdraw.elements.lines.Label(*d, label: str | None = None, **kwargs)¶
Label element.
For more options, use Label().label() method.
- Parameters:
label – text to display.
- class schemdraw.elements.lines.Line(*d, arrow: str | None = None, **kwargs)¶
Straight Line
- Parameters:
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, ‘-o’, or ‘|->’
- class schemdraw.elements.lines.LoopArrow(direction: Literal['cw', 'ccw'] = 'cw', theta1: float = 35, theta2: float = -35, width: float = 1.0, height: float = 1.0, **kwargs)¶
Loop arrow, for mesh analysis notation
- Parameters:
direction – loop direction ‘cw’ or ‘ccw’
theta1 – Angle of start of loop arrow
theta2 – Angle of end of loop arrow
width – Width of loop
height – Height of loop
- class schemdraw.elements.lines.LoopCurrent(elm_list: Sequence[Element] | None = None, direction: Literal['cw', 'ccw'] = 'cw', theta1: float = 35, theta2: float = -35, pad: float = 0.2, **kwargs)¶
Loop current label, for mesh analysis notation, placed within a box of 4 existing elements.
- Parameters:
elm_list – List of 4 elements surrounding loop, in order (top, right, bottom, left)
direction – loop direction ‘cw’ or ‘ccw’
theta1 – Angle of start of loop arrow
theta2 – Angle of end of loop arrow
pad – Distance from elements to loop
- class schemdraw.elements.lines.Rect(*d, corner1: Tuple[float, float] | Point = (0, 0), corner2: Tuple[float, float] | Point = (1, 1), fill: str | None = None, lw: float | None = None, ls: Literal['-', ':', '--', '-.'] | None = None, **kwargs)¶
Rectangle Element
Used mainly for buliding more complex elements. Corner arguments are relative to Element coordinates, not Drawing coordinates.
- Parameters:
corner1 – Position of top-left corner
corner2 – Position of bottom-right corner
fill – Color to fill if not None
lw – Line width
ls – Line style ‘-’, ‘–’, ‘:’, etc.
- class schemdraw.elements.lines.Tag(*d, width: float = 1.5, height: float = 0.625, **kwargs)¶
Tag/flag element for labeling signal names.
Because text size is unknown until drawn, must specify width manually to fit a given text label.
- Parameters:
width – Width of the tag
height – Height of the tag
- class schemdraw.elements.lines.Wire(shape: str = '-', k: float = 1, arrow: str | None = None, **kwargs)¶
Connect the .at() and .to() positions with lines depending on shape
- Parameters:
shape – Determines shape of wire: -: straight line |-: right-angle line starting vertically -|: right-angle line starting horizontally ‘z’: diagonal line with horizontal end segments ‘N’: diagonal line with vertical end segments n: n- or u-shaped lines c: c- or ↄ-shaped lines
k – Distance before the wire changes directions in n and c shapes.
arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’
- delta(dx: float = 0, dy: float = 0)¶
Specify ending position relative to start position
- class schemdraw.elements.lines.ZLabel(ofst: float = 0.5, hofst: float = 0.4, length: float = 1, lengthtip: float = 0.5, headlength: float = 0.25, headwidth: float = 0.15, **kwargs)¶
Right-angle arrow, often used to indicate impedance looking in to a node
Use .at() method to place the label over an existing element.
- Parameters:
ofst – Vertical offset from centerline of element
hofst – Horizontal offset from center of element
length – Length of the arrow tail
lengthtip – Length of the arrow tip
headlength – Arrowhead length
headwidth – Arrowhead width
Cables and Connectors¶
Cable elements, coaxial and triaxial
- class schemdraw.elements.cables.Coax(*d, length: float = 3, radius: float = 0.3, leadlen: float = 0.6, **kwargs)¶
Coaxial cable element.
- Parameters:
length – Total length of the cable, excluding lead extensions.
radius – Radius of shield
leadlen – Distance (x) from start of center conductor to start of shield.
- Anchors:
shieldstart
shieldstart_top
shieldend
shieldend_top
shieldcenter
shieldcenter_top
- class schemdraw.elements.cables.Triax(*d, length: float = 3, leadlen: float = 0.6, radiusinner: float = 0.3, radiusouter: float = 0.6, shieldofststart: float = 0.3, shieldofstend: float = 0.3, **kwargs)¶
Triaxial cable element.
- Parameters:
length – Total length of the cable
radiusinner – Radius of inner guard
radiusouter – Radius of outer shield
leadlen – Distance (x) from start of center conductor to start of guard.
shieldofststart – Distance from start of inner guard to start of outer shield
shieldofstend – Distance from end of outer shield to end of inner guard
- Anchors:
shieldstart
shieldstart_top
shieldend
shieldend_top
shieldcenter
shieldcenter_top
guardstart
guardstart_top
guardend
guardend_top
Connectors and bus lines
- class schemdraw.elements.connectors.BusConnect(*d, n: int = 1, dy: float = 0.6, up: bool = True, lwbus: float = 4, l: float = 3, **kwargs)¶
Data bus connection.
Adds the short diagonal lines that break out a bus (wide line) to connect to an Ic or Header element.
- Parameters:
n – Number of parallel lines
dy – Distance between parallel lines
up – Slant up or down
lwbus – Line width of bus line
l – length of connection lines
- Anchors:
start
end
p[X] where X is int for each data line
- class schemdraw.elements.connectors.BusLine(*d, lw: float = 4, **kwargs)¶
Data bus line. Just a wide line.
Use BusConnect to break out connections to the BusLine.
- Parameters:
lw – Line width
- class schemdraw.elements.connectors.CoaxConnect(*d, radius: float = 0.4, radiusinner: float = 0.12, fillinner: str = 'bg', **kwargs)¶
Coaxial connector
- Parameters:
radius – Radius of outer shell
radiusinner – Radius of inner conductor
fillinner – Color to fill inner conductor
- Anchors:
center
N
S
E
W
- class schemdraw.elements.connectors.DB25(*d, pinspacing: float = 0.6, edge: float = 0.3, number: bool = False, pinfill: str = 'bg', **kwargs)¶
DB25 Connector
- Parameters:
pinspacing – Distance between pins
edge – Distance between edge and pins
number – Draw pin numbers
pinfill – Color to fill pin circles
- Anchors:
pin1 thru pin25
- class schemdraw.elements.connectors.DB9(*d, pinspacing: float = 0.6, edge: float = 0.3, number: bool = False, pinfill: str = 'bg', **kwargs)¶
DB9 Connector
- Parameters:
pinspacing – Distance between pins
edge – Distance between edge and pins
number – Draw pin numbers
pinfill – Color to fill pin circles
- Anchors:
pin1 thru pin9
- class schemdraw.elements.connectors.Header(*d, rows: int = 4, cols: int = 1, style: Literal['round', 'square', 'screw'] = 'round', numbering: Literal['lr', 'ud', 'ccw'] = 'lr', shownumber: bool = False, pinsleft: Sequence[str] | None = None, pinsright: Sequence[str] | None = None, pinalignleft: Literal['center', 'top', 'bottom'] = 'bottom', pinalignright: Literal['center', 'top', 'bottom'] = 'bottom', pinfontsizeright: float = 9, pinfontsizeleft: float = 9, pinspacing: float = 0.6, edge: float = 0.3, pinfill: str = 'bg', **kwargs)¶
Header connector element
- Parameters:
rows – Number of rows
cols – Number of columns. Pin numbering requires 1 or 2 columns
style – Connector style, ‘round’, ‘square’, or ‘screw’
numbering – Pin numbering order. ‘lr’ for left-to-right numbering, ‘ud’ for up-down numbering, or ‘ccw’ for counter-clockwise (integrated-circuit style) numbering. Pin 1 is always at the top-left corner, unless flip method is also called.
shownumber – Draw pin numbers outside the header
pinsleft – List of pin labels for left side
pinsright – List of pin labels for right side
pinalignleft – Vertical alignment for pins on left side (‘center’, ‘top’, ‘bottom’)
pinalignright – Vertical alignment for pins on right side (‘center’, ‘top’, ‘bottom’)
pinfontsizeleft – Font size for pin labels on left
pinfontsizeright – Font size for pin labels on right
pinspacing – Distance between pins
edge – Distance between header edge and first pin row/column
pinfill – Color to fill pin circles
- Anchors:
pin[X] for each pin
- class schemdraw.elements.connectors.Jack(*d, **kwargs)¶
Jack (female connector)
- class schemdraw.elements.connectors.Jumper(*d, pinspacing: float = 0.6, **kwargs)¶
Jumper for use on a Header element
Set position using at() method with a Header pin location, e.g. Jumper().at(H.in1)
- Parameters:
pinspacing – Spacing between pins
- class schemdraw.elements.connectors.OrthoLines(*d, n: int = 1, dy: float = 0.6, xstart: float | None = None, arrow: str | None = None, **kwargs)¶
Orthogonal multiline connectors
Use at() and to() methods to specify starting and ending location of OrthoLines.
The default lines are spaced to provide connection to pins with default spacing on Ic element or connector such as a Header.
- Parameters:
n – Number of parallel lines
dy – Distance between parallel lines
xstart – Fractional distance (0-1) to start vertical portion of first ortholine
- delta(dx: float = 0, dy: float = 0)¶
Specify ending position relative to start position
- class schemdraw.elements.connectors.Plug(*d, **kwargs)¶
Plug (male connector)
- class schemdraw.elements.connectors.RightLines(*d, n: int = 1, dy: float = 0.6, arrow: str | None = None, **kwargs)¶
Right-angle multi-line connectors
Use at() and to() methods to specify starting and ending location.
The default lines are spaced to provide connection to pins with default spacing on Ic element or connector such as a Header.
- Parameters:
n – Number of parallel lines
dy – Distance between parallel lines
- delta(dx: float = 0, dy: float = 0)¶
Specify ending position relative to start position
- class schemdraw.elements.connectors.Terminal(*d, r: float = 0.18, open: bool = False, **kwargs)¶
Terminal element
Transistors¶
Transistor elements
- class schemdraw.elements.transistors.AnalogBiasedFet(*d, bulk: bool = False, offset_gate: bool = True, arrow: bool = True, **kwargs)¶
Generic biased small-signal Field Effect Transistor, analog style
- Parameters:
bulk – Draw bulk contact
offset_gate – Draw gate on the source side of the transistor, rather than middle
arrow – Draw source dot on the transistor if bulk dot is not drawn
- Anchors:
source drain gate bulk (if bulk=True) center
- class schemdraw.elements.transistors.AnalogNFet(*d, bulk: bool = False, offset_gate: bool = True, arrow: bool = True, **kwargs)¶
N-type Field Effect Transistor, analog style
- Parameters:
bulk – Draw bulk contact
offset_gate – Draw gate on the source side of the transistor, rather than middle
arrow – Draw source arrow on the transistor if bulk arrow is not drawn
- Anchors:
source drain gate bulk (if bulk=True) center
- class schemdraw.elements.transistors.AnalogPFet(*d, bulk: bool = False, offset_gate: bool = True, arrow: bool = True, **kwargs)¶
P-type Field Effect Transistor, analog style
- Parameters:
bulk – Draw bulk contact
offset_gate – Draw gate on the source side of the transistor, rather than middle
arrow – Draw source arrow on the transistor if bulk arrow is not drawn
- Anchors:
source drain gate bulk (if bulk=True) center
- class schemdraw.elements.transistors.Bjt(*d, circle: bool = False, **kwargs)¶
Bipolar Junction Transistor (untyped)
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
center
- class schemdraw.elements.transistors.Bjt2(*d, circle: bool = False, **kwargs)¶
Bipolar Junction Transistor (untyped) which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
- class schemdraw.elements.transistors.BjtNpn(*d, circle: bool = False, **kwargs)¶
NPN Bipolar Junction Transistor
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
center
- class schemdraw.elements.transistors.BjtNpn2(*d, circle: bool = False, **kwargs)¶
NPN Bipolar Junction Transistor which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
- class schemdraw.elements.transistors.BjtPnp(*d, circle: bool = False, **kwargs)¶
PNP Bipolar Junction Transistor
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
center
- class schemdraw.elements.transistors.BjtPnp2(*d, circle: bool = False, **kwargs)¶
PNP Bipolar Junction Transistor which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
- class schemdraw.elements.transistors.BjtPnp2c(*d, circle: bool = False, **kwargs)¶
PNP Bipolar Junction Transistor with 2 collectors
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
C2
center
- class schemdraw.elements.transistors.BjtPnp2c2(*d, circle: bool = False, **kwargs)¶
2-Collector PNP Bipolar Junction Transistor which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
collector
emitter
base
C2
- class schemdraw.elements.transistors.JFet(*d, circle: bool = False, **kwargs)¶
Junction Field Effect Transistor (untyped)
- Anchors:
source
drain
gate
center
- class schemdraw.elements.transistors.JFet2(*d, circle: bool = False, **kwargs)¶
Junction Field Effect Transistor (untyped) which extends collector/emitter leads to the desired length
- Anchors:
source
drain
gate
- class schemdraw.elements.transistors.JFetN(*d, circle: bool = False, **kwargs)¶
N-type Junction Field Effect Transistor
- Parameters:
circle – Draw circle around the transistor
- Anchors:
source
drain
gate
center
- class schemdraw.elements.transistors.JFetN2(*d, circle: bool = False, **kwargs)¶
N-type Junction Field Effect Transistor which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
source
drain
gate
- class schemdraw.elements.transistors.JFetP(*d, circle: bool = False, **kwargs)¶
P-type Junction Field Effect Transistor
- Parameters:
circle – Draw circle around the transistor
- Anchors:
source
drain
gate
center
- class schemdraw.elements.transistors.JFetP2(*d, circle: bool = False, **kwargs)¶
P-type Junction Field Effect Transistor which extends collector/emitter leads to the desired length
- Parameters:
circle – Draw circle around the transistor
- Anchors:
source
drain
gate
- class schemdraw.elements.transistors.NFet(*d, bulk: bool = False, **kwargs)¶
N-type Field Effect Transistor
- Parameters:
bulk – Draw bulk contact
- Anchors:
source
drain
gate
center
- class schemdraw.elements.transistors.NFet2(*d, bulk: bool = False, **kwargs)¶
N-type Field Effect Transistor which extends source/drain leads to the desired length
- Parameters:
bulk – Draw bulk contact
- Anchors:
source
drain
gate
- class schemdraw.elements.transistors.NMos(*d, diode: bool = False, circle: bool = False, **kwargs)¶
N-type Metal Oxide Semiconductor Field Effect Transistor
- Args:
diode: Draw body diode circle: Draw circle around the mosfet
- Anchors:
source
drain
gate
Note: vertical orientation. For horizontal orientation, see NMos2.
- class schemdraw.elements.transistors.NMos2(*d, diode: bool = False, circle: bool = False, **kwargs)¶
N-type Metal Oxide Semiconductor Field Effect Transistor
- Args:
diode: Draw body diode circle: Draw circle around the mosfet
- Anchors:
source
drain
gate
Note: horizontal orientation. For vertical orientation, see NMos.
- class schemdraw.elements.transistors.PFet(*d, bulk: bool = False, **kwargs)¶
P-type Field Effect Transistor
- Parameters:
bulk – Draw bulk contact
- Anchors:
source drain gate center
- class schemdraw.elements.transistors.PFet2(*d, bulk: bool = False, **kwargs)¶
P-type Field Effect Transistor which extends source/drain leads to the desired length
- Parameters:
bulk – Draw bulk contact
- Anchors:
source
drain
gate
- class schemdraw.elements.transistors.PMos(*d, diode: bool = False, circle: bool = False, **kwargs)¶
P-type Metal Oxide Semiconductor Field Effect Transistor
- Args:
diode: Draw body diode circle: Draw circle around the mosfet
- Anchors:
source
drain
gate
Note: vertical orientation. For horizontal orientation, see PMos2.
- class schemdraw.elements.transistors.PMos2(*d, diode: bool = False, circle: bool = False, **kwargs)¶
P-type Metal Oxide Semiconductor Field Effect Transistor
- Args:
diode: Draw body diode circle: Draw circle around the mosfet
- Anchors:
source
drain
gate
Note: horizontal orientation. For vertical orientation, see PMos.
Transformers¶
Transformer element definitions
- class schemdraw.elements.xform.Transformer(*d, t1: int = 4, t2: int = 4, core: bool = True, loop: bool = False, **kwargs)¶
Add taps to the windings on either side using the .taps method.
- Parameters:
t1 – Turns on primary (left) side
t2 – Turns on secondary (right) side
core – Draw the core (parallel lines)
loop – Use spiral/cycloid (loopy) style
- Anchors:
p1: primary side 1
p2: primary side 2
s1: secondary side 1
s2: secondary side 2
Other anchors defined by taps method
- tap(name: str, pos: int, side: Literal['primary', 'secondary', 'left', 'right'] = 'primary')¶
Add a tap
A tap is simply a named anchor definition along one side of the transformer.
- Parameters:
name – Name of the tap/anchor
pos – Turn number from the top of the tap
side – Primary (left) or Secondary (right) side
Opamp and Integrated Circuits¶
Operation amplifier
- class schemdraw.elements.opamp.Opamp(*d, sign: bool = True, leads: bool = False, **kwargs)¶
Operational Amplifier.
- Parameters:
sign – Draw +/- labels at each input
leads – Draw short leads on input/output
- Anchors:
in1
in2
out
vd
vs
n1
n2
n1a
n2a
Integrated Circuit Element
- class schemdraw.elements.intcircuits.DFlipFlop(*d, preclr: bool = False, preclrinvert: bool = True, size=(2, 3), **kwargs)¶
D-Type Flip Flop
- Parameters:
preclr – Show preset and clear inputs
preclrinvert – Add invert bubble to preset and clear inputs
size – Size of the box
- Anchors:
D
CLK
Q
Qbar
PRE
CLR
- class schemdraw.elements.intcircuits.Ic(size: Tuple[float, float] | Point | None = None, pins: Sequence[IcPin] | None = None, pinspacing: float = 0.6, edgepadH: float = 0.25, edgepadW: float = 0.25, leadlen: float = 0.5, lofst: float = 0.15, lsize: float = 14, plblofst: float = 0.05, plblsize: float = 11, slant: float = 0, w: float | None = None, h: float | None = None, **kwargs)¶
Integrated Circuit element, or any other black-box element with arbitrary pins on any side.
- Parameters:
size – (Width, Height) of box
pins – List of IcPin instances defining the inputs/outputs
pinspacing – Spacing between pins
edgepadH – Padding between top/bottom and first pin
edgepadW – Padding between left/right and first pin
lofst – Offset between edge and label (inside box)
lsize – Font size of labels (inside box)
plblofst – Offset between edge and pin label (outside box)
plblsize – Font size of pin labels (outside box)
slant – Slant angle of top/bottom edges (e.g. for multiplexers)
If a pin is named ‘>’, it will be drawn as a proper clock signal input.
- Anchors:
inL[X] - Each pin on left side
inR[X] - Each pin on right side
inT[X] - Each pin on top side
inB[X] - Each pin on bottom side
pin[X] - Each pin with a number
CLK (if clock pin is defined with ‘>’ name)
Pins with names are also defined as anchors (if the name does not conflict with other attributes).
- class schemdraw.elements.intcircuits.Ic555(*d, **kwargs)¶
- class schemdraw.elements.intcircuits.IcDIP(*d, pins: int = 8, names: Sequence[str] | None = None, notch: bool = True, width: float = 3, pinw: float = 0.6, spacing: float = 0.5, number: bool = True, fontsize: float = 12, pfontsize: float = 10, **kwargs)¶
Dual-inline Package Integrated Circuit.
- Parameters:
pins – number of pins
names – List of names for each pin to display inside the box
notch – Show the notch at top of box
width – Width of the box
pinw – Width and height of each pin
spacing – Distance between each pin
number – Show pin numbers inside each pin
fontsize – Size for pin name labels
pfontsize – Size for pin number labels
- Anchors:
p[x] - Each pin
p[x]_in - Inside contact for each pin
If signal names are provided, they will also be added as anchors along with _in inside variants.
- class schemdraw.elements.intcircuits.IcPin(name: str | None = None, pin: str | None = None, side: Side = 'L', pos: float | None = None, slot: str | None = None, invert: bool = False, invertradius: float = 0.15, color: str | None = None, rotation: float = 0, anchorname: str | None = None, lblsize: float | None = None)¶
Integrated Circuit Pin
- Parameters:
name – Input/output name (inside the box)
pin – Pin name/number (outside the box)
side – Side of box for the pin, ‘left’, ‘right’, ‘top’, ‘bottom’
pos – Pin position along the side, fraction from 0-1
slot – Slot definition of pin location, given in ‘X/Y’ format. ‘2/4’ is the second pin on a side with 4 pins.
invert – Add an invert bubble to the pin
invertradius – Radius of invert bubble
color – Color for the pin and label
rotation – Rotation for label text
anchorname – Named anchor for the pin
- class schemdraw.elements.intcircuits.JKFlipFlop(*d, preclr: bool = False, preclrinvert: bool = True, size=(2, 3), **kwargs)¶
J-K Flip Flop
- Parameters:
preclr – Show preset and clear inputs
preclrinvert – Add invert bubble to preset and clear inputs
size – Size of the box
- Anchors:
J
K
CLK
Q
Qbar
PRE
CLR
- class schemdraw.elements.intcircuits.Multiplexer(demux: bool = False, size: Tuple[float, float] | Point | None = None, pins: Sequence[IcPin] | None = None, pinspacing: float = 0.6, edgepadH: float = 0.25, edgepadW: float = 0.25, leadlen: float = 0.5, lofst: float = 0.15, lsize: float = 14, plblofst: float = 0.05, plblsize: float = 11, slant: float = 25, **kwargs)¶
- Parameters:
demux – Draw as demultiplexer
size – (Width, Height) of box
pins – List of IcPin instances defining the inputs/outputs
pinspacing – Spacing between pins
edgepadH – Padding between top/bottom and first pin
edgepadW – Padding between left/right and first pin
lofst – Offset between edge and label (inside box)
lsize – Font size of labels (inside box)
plblofst – Offset between edge and pin label (outside box)
plblsize – Font size of pin labels (outside box)
slant – Slant angle of top/bottom edges
If a pin is named ‘>’, it will be drawn as a proper clock signal input.
- Anchors:
inL[X] - Each pin on left side
inR[X] - Each pin on right side
inT[X] - Each pin on top side
inB[X] - Each pin on bottom side
pin[X] - Each pin with a number
CLK (if clock pin is defined with ‘>’ name)
Pins with names are also defined as anchors (if the name does not conflict with other attributes).
- class schemdraw.elements.intcircuits.SevenSegment(*d, decimal: bool = False, digit: int | str = 8, segcolor: str = 'red', tilt: float = 10, labelsegments: bool = True, anode: bool = False, cathode: bool = False, size=(2, 1.5), **kwargs)¶
A seven-segment display digit.
- Parameters:
decimal – Show decimal point segment
digit – Number to display
segcolor – Color of segments
tilt – Tilt angle in degrees
labelsegments – Add a-g labels to each segment
anode – Add common anode pin
cathode – Add common cathode pin
size – Total size of the box
- Anchors:
a
b
c
d
e
f
g
dp
cathode
anode
- class schemdraw.elements.intcircuits.VoltageRegulator(*d, size=(2, 1.5), **kwargs)¶
Voltage regulator
- Parameters:
size – Size of the box
- Anchors:
in
out
gnd
- schemdraw.elements.intcircuits.sevensegdigit(bottom: float = 0, left: float = 0, seglen: float = 1.5, segw: float = 0.3, spacing: float = 0.12, decimal: bool = False, digit: int | str = 8, segcolor: str = 'red', tilt: float = 10, labelsegments: bool = True) list[SegmentType] ¶
Generate drawing segments for a 7-segment display digit. Use for building new elements incorporating a 7-segment display.
- Parameters:
bottom – Location of bottom of digit
left – Location of left side of digit
seglen – Length of one segment
segw – Width of one segment
spacing – Distance between segments in corners
decimal – Show decimal point segment
digit – Number to display
segcolor – Color of segments
tilt – Tilt angle in degrees
labelsegments – Add a-g labels to each segment
anode – Add common anode pin
cathode – Add common cathode pin
size – Total size of the box
- Returns:
List of Segments making the digit
Other¶
Other elements
- class schemdraw.elements.misc.AudioJack(*d, radius: float = 0.075, ring: bool = False, ringswitch: bool = False, dots: bool = True, switch: bool = False, open: bool = True, **kwargs)¶
Audio Jack with 2 or 3 connectors and optional switches.
- Parameters:
ring – Show ring (third conductor) contact
switch – Show switch on tip contact
ringswitch – Show switch on ring contact
dots – Show connector dots
radius – Radius of connector dots
- Anchors:
tip
sleeve
ring
ringswitch
tipswitch
- class schemdraw.elements.misc.Mic(*d, **kwargs)¶
Microphone element with two inputs.
- Anchors:
in1
in2
- class schemdraw.elements.misc.Motor(*d, **kwargs)¶
- class schemdraw.elements.misc.Speaker(*d, **kwargs)¶
Speaker element with two inputs.
- Anchors:
in1
in2
Compound elements made from groups of other elements
- class schemdraw.elements.compound.ElementCompound(*d, **kwargs)¶
Element onto which other elements can be added like a drawing
- move(dx: float = 0, dy: float = 0) None ¶
Move relative to current position
- move_from(xy: Point, dx: float = 0, dy: float = 0, theta: float | None = None) None ¶
Move relative to xy position
- class schemdraw.elements.compound.Optocoupler(*d, box: bool = True, boxfill: str = 'none', boxpad: float = 0.2, base: bool = False, **kwargs)¶
Optocoupler element
- Parameters:
box – Draw a box around the optocoupler
boxfill – Color to fill the box
boxpad – Padding between phototransistor and box
base – Add a base contact to the phototransistor
- Anchors:
anode
cathode
emitter
collector
base (if base==True)
- class schemdraw.elements.compound.Rectifier(fill=False, labels=None, **kwargs)¶
Diode Rectifier Bridge
- Parameters:
fill – Fill the didoes
labels – Labels to draw on each resistor
- Anchors:
N
S
E
W
- class schemdraw.elements.compound.Relay(*d, unit: float = 2, cycl: bool = False, switch: str = 'spst', core: bool = True, box: bool = True, boxfill: str = 'none', boxpad: float = 0.25, swreverse: bool = False, swflip: bool = False, link: bool = True, **kwargs)¶
Relay element with an inductor and switch
- Parameters:
unit – Unit length of the inductor
cycloid – Use cycloid style inductor
switch – Switch style ‘spst’, ‘spdt’, ‘dpst’, ‘dpdt’
swreverse – Reverse the switch
swflip – Flip the switch up/down
core – Show inductor core bar
link – Show dotted line linking inductor and switch
box – Draw a box around the relay
boxfill – Color to fill the box
boxpad – Spacing between components and box
- class schemdraw.elements.compound.Wheatstone(vout: bool = False, labels: Sequence[str] | None = None, **kwargs)¶
Wheatstone Resistor Bridge
- Parameters:
vout – draw output terminals inside the bridge
labels – Labels to draw on each resistor
- Anchors:
N
S
E
W
vo1 (if vout==True)
vo2 (if vout==True)
Twoport elements made from groups of other elements
- class schemdraw.elements.twoports.CurrentTransactor(*d, reverse_output: bool = False, **kwargs)¶
Current transactor
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
reverse_output – Switch direction of output source, defaults to False
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.ElementTwoport(*d, input_element: Element2Term, output_element: Element2Term, boxpadx: float = 0.2, boxpady: float = 0.2, minw: float = 0.5, terminals: bool = True, unit: float = 1.5, width: float = 2.15, box: bool = True, boxfill: str | None = None, boxlw: float | None = None, boxls: Literal['-', ':', '--', '-.'] | None = None, **kwargs)¶
Compound twoport element
- Parameters:
input_element – The element forming the input branch of the twoport
output_element – The element forming the output branch of the twoport
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
unit – Length of input and output element
width – Width of the twoport box
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.Nullor(*d, **kwargs)¶
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.TransadmittanceTransactor(*d, reverse_output: bool = False, **kwargs)¶
Transadmittance transactor
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
reverse_output – Switch direction of output source, defaults to False
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.TransimpedanceTransactor(*d, reverse_output: bool = False, **kwargs)¶
Transimpedance transactor
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
reverse_output – Switch direction of output source, defaults to False
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.TwoPort(*d, sign: bool = True, arrow: bool = True, reverse_output: bool = False, **kwargs)¶
Generic Twoport
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
sign – Draw input and output terminal labels
arrow – Draw arrow from input to output
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.VMCMPair(*d, **kwargs)¶
Nullor
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
- Anchors:
in_p
in_n
out_p
out_n
center
- class schemdraw.elements.twoports.VoltageTransactor(*d, reverse_output: bool = False, **kwargs)¶
Voltage transactor
- Parameters:
bpadx – Horizontal padding from edge of either component
bpady – Vertical padding from edge of either component
minw – Margin around component if smaller than minw
terminals – Draw with terminals extending past box
component_offset – Offset between input and output element
box – Draw twoport outline
boxfill – Color to fill the twoport if not None
boxlw – Line width of twoport outline
boxls – Line style of twoport outline ‘-’, ‘–’, ‘:’, etc.
reverse_output – Switch direction of output source, defaults to False
- Anchors:
in_p
in_n
out_p
out_n
center