Electrical Elements

Two-Terminal Elements

Two-terminal element definitions

class schemdraw.elements.twoterm.Breaker(*args, **kwargs)

Circuit breaker

Parameters:

dots – Show connection dots

class schemdraw.elements.twoterm.CPE(*args, **kwargs)

Constant Phase Element

class schemdraw.elements.twoterm.Capacitor(flat plates)
Parameters:

polar – Add polarity + sign

class schemdraw.elements.twoterm.Capacitor2(*args, **kwargs)

Capacitor (curved bottom plate)

Parameters:

polar – Add polarity + sign

class schemdraw.elements.twoterm.CapacitorTrim(*args, **kwargs)

Trim capacitor

class schemdraw.elements.twoterm.CapacitorVar(*args, **kwargs)

Variable capacitor

class schemdraw.elements.twoterm.Crystal(*args, **kwargs)

Crystal oscillator

class schemdraw.elements.twoterm.CurrentMirror(*args, **kwargs)

Current mirror with optional common terminal

Anchors:
  • scommon

class schemdraw.elements.twoterm.Diac(*args, **kwargs)

Diac (diode for alternating current)

class schemdraw.elements.twoterm.Diode(*args, **kwargs)
class schemdraw.elements.twoterm.DiodeShockley(*args, **kwargs)

Shockley Diode

class schemdraw.elements.twoterm.DiodeTunnel(*args, **kwargs)

Tunnel Diode

schemdraw.elements.twoterm.Fuse

alias of FuseIEEE

class schemdraw.elements.twoterm.FuseIEC(*args, **kwargs)

Fuse (IEC Style)

class schemdraw.elements.twoterm.FuseIEEE(*args, **kwargs)

Fuse (IEEE Style)

class schemdraw.elements.twoterm.FuseUS(*args, **kwargs)

Fuse (U.S. Style)

Parameters:

dots – Show dots on connections to fuse

fill(color: bool | str = True) Element

Set element fill

class schemdraw.elements.twoterm.Inductor(*args, **kwargs)
class schemdraw.elements.twoterm.Inductor2(*args, **kwargs)

Inductor, drawn as cycloid (loopy)

Parameters:

loops – Number of inductor loops [default: 4]

class schemdraw.elements.twoterm.Josephson(*args, **kwargs)

Josephson Junction

class schemdraw.elements.twoterm.LED(*args, **kwargs)

Light emitting diode

class schemdraw.elements.twoterm.LED2(*args, **kwargs)

Light emitting diode (curvy light lines)

class schemdraw.elements.twoterm.Memristor(*args, **kwargs)

Memristor (resistor with memory)

class schemdraw.elements.twoterm.Memristor2(*args, **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(*args, **kwargs)

Photo-sensitive diode

schemdraw.elements.twoterm.Photoresistor

alias of PhotoresistorIEEE

schemdraw.elements.twoterm.PhotoresistorBox

alias of PhotoresistorIEC

class schemdraw.elements.twoterm.PhotoresistorIEC(*args, **kwargs)

Photo-resistor (European style)

class schemdraw.elements.twoterm.PhotoresistorIEEE(*args, **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(*args, **kwargs)

Potentiometer (European style)

Anchors:

tap

class schemdraw.elements.twoterm.PotentiometerIEEE(*args, **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(*args, **kwargs)

Resistor as box (IEC/European style)

class schemdraw.elements.twoterm.ResistorIEEE(*args, **kwargs)

Resistor (IEEE/U.S. style)

schemdraw.elements.twoterm.ResistorVar

alias of ResistorVarIEEE

class schemdraw.elements.twoterm.ResistorVarIEC(*args, **kwargs)

Variable resistor (European style)

class schemdraw.elements.twoterm.ResistorVarIEEE(*args, **kwargs)

Variable resistor (U.S. style)

class schemdraw.elements.twoterm.Rshunt(*args, **kwargs)

Shunt Resistor

class schemdraw.elements.twoterm.SCR(*args, **kwargs)

Silicon controlled rectifier (or thyristor)

Anchors:

gate

class schemdraw.elements.twoterm.Schottky(*args, **kwargs)

Schottky Diode

class schemdraw.elements.twoterm.SparkGap(*args, **kwargs)

Spark Gap

class schemdraw.elements.twoterm.Thermistor(*args, **kwargs)
class schemdraw.elements.twoterm.Triac(*args, **kwargs)
Anchors:

gate

class schemdraw.elements.twoterm.Varactor(*args, **kwargs)

Varactor Diode/Varicap/Variable Capacitance Diode

class schemdraw.elements.twoterm.VoltageMirror(*args, **kwargs)

Voltage mirror with optional common terminal

This element does not support filling

Anchors:
  • scommon

class schemdraw.elements.twoterm.Zener(*args, **kwargs)

Zener Diode

Sources, meters, and lamp elements

class schemdraw.elements.sources.Battery(*args, **kwargs)
class schemdraw.elements.sources.BatteryCell(*args, **kwargs)

Cell

class schemdraw.elements.sources.Lamp(*args, **kwargs)

Incandescent Lamp

class schemdraw.elements.sources.Lamp2(*args, **kwargs)

Incandescent Lamp (with X through a Source)

class schemdraw.elements.sources.MeterA(*args, **kwargs)

Ammeter

class schemdraw.elements.sources.MeterI(*args, **kwargs)

Current Meter (I)

class schemdraw.elements.sources.MeterOhm(*args, **kwargs)

Ohm meter

class schemdraw.elements.sources.MeterV(*args, **kwargs)

Volt meter

class schemdraw.elements.sources.Neon(*args, **kwargs)

Neon bulb

class schemdraw.elements.sources.Solar(*args, **kwargs)

Solar source

class schemdraw.elements.sources.Source(*args, **kwargs)

Generic source element

class schemdraw.elements.sources.SourceControlled(*args, **kwargs)

Generic controlled source

class schemdraw.elements.sources.SourceControlledI(*args, **kwargs)

Controlled current source

class schemdraw.elements.sources.SourceControlledV(*args, **kwargs)

Controlled voltage source

class schemdraw.elements.sources.SourceI(*args, **kwargs)

Current source

class schemdraw.elements.sources.SourcePulse(*args, **kwargs)

Pulse source

class schemdraw.elements.sources.SourceRamp(*args, **kwargs)

Ramp/sawtooth source

class schemdraw.elements.sources.SourceSin(*args, **kwargs)

Source with sine

class schemdraw.elements.sources.SourceSquare(*args, **kwargs)

Square wave source

class schemdraw.elements.sources.SourceTriangle(*args, **kwargs)

Triangle source

class schemdraw.elements.sources.SourceV(*args, **kwargs)

Voltage source

One-terminal Elements

One terminal element definitions

class schemdraw.elements.oneterm.Antenna(*args, **kwargs)
class schemdraw.elements.oneterm.AntennaLoop(*args, **kwargs)

Loop antenna (diamond style)

class schemdraw.elements.oneterm.AntennaLoop2(*args, **kwargs)

Loop antenna (square style)

class schemdraw.elements.oneterm.Ground(*args, **kwargs)

Ground connection

Keyword Arguments:

lead – Show lead wire [default: True]

class schemdraw.elements.oneterm.GroundChassis(*args, **kwargs)

Chassis ground

Keyword Arguments:

lead – Show lead wire

class schemdraw.elements.oneterm.GroundSignal(*args, **kwargs)

Signal ground

Keyword Arguments:

lead – Show lead wire

class schemdraw.elements.oneterm.NoConnect(*args, **kwargs)

No Connection

class schemdraw.elements.oneterm.Vdd(*args, **kwargs)

Vdd connection

Keyword Arguments:

lead – Show lead wire

class schemdraw.elements.oneterm.Vss(*args, **kwargs)

Vss connection

Keyword Arguments:

lead – Show lead wire

Switches

Switches and buttons

class schemdraw.elements.switches.Button(*args, **kwargs)

Push button switch

Parameters:

nc – Normally closed

class schemdraw.elements.switches.Switch(*args, **kwargs)

Toggle Switch

Parameters:

action – action arrow (‘open’ or ‘close’)

class schemdraw.elements.switches.SwitchDIP(*args, **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 [default: #333333]

  • swidth – Width of one switch [default: 0.4]

  • spacing – Spacing between switches [default: 0.2]

class schemdraw.elements.switches.SwitchDpdt(*args, **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(*args, **kwargs)

Double-pole single-throw switch

Parameters:

link – Show dotted line linking switch levers

Anchors:
  • p1

  • p2

  • t1

  • t2

class schemdraw.elements.switches.SwitchReed(*args, **kwargs)

Reed Switch

class schemdraw.elements.switches.SwitchRotary(*args, **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(*args, **kwargs)

Single-pole double throw switch.

Parameters:

action – action arrow (‘open’ or ‘close’)

Anchors:
  • a

  • b

  • c

class schemdraw.elements.switches.SwitchSpdt2(*args, **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(*args, **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 [default: 0.25]

  • arrowwidth – Width of arrowhead [default: 0.2]

class schemdraw.elements.lines.Arc2(*args, **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.

  • arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, or ‘-o’

Anchors:

start end ctrl mid

delta(dx: float = 0, dy: float = 0) Element

Specify change in position

to(xy: Tuple[float, float] | Point, dx: float = 0, dy: float = 0) Element

Specify ending position

Parameters:
  • xy – Ending position of element

  • dx – X-offset from xy position

  • dy – Y-offset from xy position

class schemdraw.elements.lines.Arc3(*args, **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 [default: 0.25]

  • arrowwidth – Width of arrowhead [default: 0.2]

Anchors:

start end center ctrl1 ctrl2

delta(dx: float = 0, dy: float = 0) Element

Specify change in position

to(xy: Tuple[float, float] | Point, dx: float = 0, dy: float = 0) Element

Specify ending position

Parameters:
  • xy – Ending position of element

  • dx – X-offset from xy position

  • dy – Y-offset from xy position

class schemdraw.elements.lines.ArcLoop(*args, **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’ [default: None]

  • arrowlength – Length of arrowhead [default: 0.25]

  • arrowwidth – Width of arrowhead [default: 0.2]

Anchors:

start end mid BL BR TL TR

delta(dx: float = 0, dy: float = 0) Element

Specify ending position relative to start position

to(xy: Tuple[float, float] | Point, dx: float = 0, dy: float = 0) Element

Specify ending position

Parameters:
  • xy – Ending position of element

  • dx – X-offset from xy position

  • dy – Y-offset from xy position

class schemdraw.elements.lines.ArcN(*args, **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’ [default: None]

  • arrowlength – Length of arrowhead [default: 0.25]

  • arrowwidth – Width of arrowhead [default: 0.2]

class schemdraw.elements.lines.ArcZ(*args, **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’ [default: None]

  • arrowlength – Length of arrowhead [default: 0.25]

  • arrowwidth – Width of arrowhead [default: 0.2]

class schemdraw.elements.lines.Arrow(*args, **kwargs)
Parameters:

double – Show arrowhead on both ends

Keyword Arguments:
  • arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, ‘-o’, or ‘|->’

  • headwidth – Width of arrow head [default: 0.15]

  • headlength – Length of arrow head [default: 0.25]

class schemdraw.elements.lines.Arrowhead(*args, **kwargs)
Parameters:
  • headwidth – width of arrow head [default: .15]

  • headlength – length of arrow head [default: .25]

class schemdraw.elements.lines.CurrentLabel(*args, **kwargs)

Current label arrow drawn above an element

Use .at() method to place the label over an existing element.

Parameters:
  • reverse – Reverse the arrow direction

  • ofst – Offset distance from centerline of element [default: 0.4]

  • length – Length of the arrow [default: 2]

  • top – Draw arrow on top or bottom of element [default: True]

  • headlength – Length of arrowhead [default: 0.3]

  • headwidth – Width of arrowhead [default: 0.2]

at(xy: XY | tuple['Element', str], dx: float = 0, dy: float = 0) Element

Specify CurrentLabel position.

If xy is an Element, arrow will be centered along element and its color will also be inherited.

Parameters:
  • xy – The absolute (x, y) position or an

  • over (Element instance to center the arrow) –

class schemdraw.elements.lines.CurrentLabelInline(*args, **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 [default: 0.3]

  • headwidth – Width of arrowhead [default: 0.3]

at(xy: XY | Element) Element

Specify CurrentLabelInline position.

If xy is an Element, arrow will be placed along the element’s leads and the arrow color will be inherited.

Parameters:
  • xy – The absolute (x, y) position or an

  • on (Element instance to place the arrow) –

class schemdraw.elements.lines.DataBusLine(*args, **kwargs)

Straight Line with bus indication stripe

class schemdraw.elements.lines.Dot(*args, **kwargs)

Connection Dot

Keyword Arguments:
  • radius – Radius of dot [default: 0.075]

  • open – Draw as an open circle [default: False]

class schemdraw.elements.lines.DotDotDot(*args, **kwargs)

Ellipsis element

Keyword Arguments:
  • radius – Radius of dots [default 0.075]

  • open – Draw dots as open circles [default: False]

“Ellipsis” is a reserved keyword in Python used for slicing, thus the name DotDotDot.

class schemdraw.elements.lines.Encircle(*args, **kwargs)

Draw ellipse around all elements in the list

Parameters:
  • elm_list – List of elements to enclose

  • padx – Horizontal distance from elements to loop [default: .2]

  • pady – Vertical distance from elements to loop [default: .2]

  • includelabels – Include labels in the ellipse

class schemdraw.elements.lines.EncircleBox(*args, **kwargs)

Draw rounded box around all elements in the list

Parameters:
  • elm_list – List elements to enclose

  • cornerraidus – radius of corner rounding [default: 0.3]

  • padx – Horizontal distance from elements to loop [default: 0.2]

  • pady – Vertical distance from elements to loop [default: 0.2]

  • includelabels – Include labels in the box

class schemdraw.elements.lines.Gap(*args, **kwargs)

Gap for labeling port voltages, for example. Draws nothing, but provides place to attach a label such as (‘+’, ‘V’, ‘-‘).

Keyword Arguments:
  • lblloc – Label location within the gap [center]

  • lblalign – Label alignment [(center, center)]

  • lblofst – Offset to label [0]

class schemdraw.elements.lines.Label(*args, **kwargs)

Label element.

For more options, use Label().label() method.

Parameters:

label – text to display.

class schemdraw.elements.lines.Line(*args, **kwargs)

Straight Line

Parameters:

arrow – arrowhead specifier, such as ‘->’, ‘<-’, ‘<->’, ‘-o’, or ‘|->’

Keyword Arguments:
  • arrowwidth – Width of arrowhead [default: .15]

  • arrowlength – Length of arrowhead [default: 0.25]

class schemdraw.elements.lines.LoopArrow(*args, **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(*args, **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(*args, **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 [default: inherit]

  • lw – Line width [default: inherit]

  • ls – Line style ‘-’, ‘–’, ‘:’, etc. [default: inherit]

class schemdraw.elements.lines.Tag(*args, **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 [default: 1.5]

  • height – Height of the tag [default: 0.625]

class schemdraw.elements.lines.Wire(*args, **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) Element

Specify ending position relative to start position

dot(open: bool = False) Element

Add a dot to the end of the element

idot(open: bool = False) Element

Add a dot to the input/start of the element

to(xy: Tuple[float, float] | Point, dx: float = 0, dy: float = 0) Element

Specify ending position

Parameters:
  • xy – Ending position of element

  • dx – X-offset from xy position

  • dy – Y-offset from xy position

class schemdraw.elements.lines.ZLabel(*args, **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 [default: 1]

  • lengthtip – Length of the arrow tip [default: 0.5]

  • headlength – Arrowhead length [default: 0.25]

  • headwidth – Arrowhead width [default: 0.15]

at(xy: XY | Element) Element

Specify Element position.

If xy is an Element, arrow will be centered along element and its color will also be inherited.

Parameters:
  • xy – The absolute (x, y) position or an

  • over (Element instance to center the arrow) –

Cables and Connectors

Cable elements, coaxial and triaxial

class schemdraw.elements.cables.Coax(*args, **kwargs)

Coaxial cable element.

Parameters:
  • length – Total length of the cable, excluding lead extensions. [default: 3]

  • radius – Radius of shield [default: 0.3]

  • leadlen – Distance (x) from start of center conductor to start of shield. [default: 0.6]

Anchors:
  • shieldstart

  • shieldstart_top

  • shieldend

  • shieldend_top

  • shieldcenter

  • shieldcenter_top

class schemdraw.elements.cables.Triax(*args, **kwargs)

Triaxial cable element.

Parameters:
  • length – Total length of the cable [default: 3]

  • radiusinner – Radius of inner guard [default: 0.3]

  • radiusouter – Radius of outer shield [default: 0.6]

  • leadlen – Distance (x) from start of center conductor to start of guard. [default: 0.6]

  • shieldofststart – Distance from start of inner guard to start of outer shield [default: 0.3]

  • shieldofstend – Distance from end of outer shield to end of inner guard [default: 0.3]

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(*args, **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

  • up – Slant up or down

  • dy – Distance between parallel lines [default: 0.6]

  • lwbus – Line width of bus line [default: 4]

  • l – length of connection lines [default: 3]

Anchors:
  • start

  • end

  • p[X] where X is int for each data line

class schemdraw.elements.connectors.BusLine(*args, **kwargs)

Data bus line. Just a wide line.

Use BusConnect to break out connections to the BusLine.

Parameters:

lw – Line width [default: 4]

class schemdraw.elements.connectors.CoaxConnect(*args, **kwargs)

Coaxial connector

Parameters:
  • radius – Radius of outer shell [defualt: 0.4]

  • radiusinner – Radius of inner conductor [default: 0.12]

  • fillinner – Color to fill inner conductor [default: bg]

Anchors:
  • center

  • N

  • S

  • E

  • W

class schemdraw.elements.connectors.DB25(*args, **kwargs)

DB25 Connector

Parameters:
  • pinspacing – Distance between pins [default: 0.6]

  • edge – Distance between edge and pins [default: 0.3]

  • number – Draw pin numbers

  • pinfill – Color to fill pin circles [default: bg]

Anchors:
  • pin1 thru pin25

class schemdraw.elements.connectors.DB9(*args, **kwargs)

DB9 Connector

Parameters:
  • pinspacing – Distance between pins [default: 0.6]

  • edge – Distance between edge and pins [default: 0.3]

  • number – Draw pin numbers [default: False]

  • pinfill – Color to fill pin circles [default: bg]

Anchors:
  • pin1 thru pin9

class schemdraw.elements.connectors.Header(*args, **kwargs)

Header connector element

Parameters:
  • rows – Number of rows

  • cols – Number of columns. Pin numbering requires 1 or 2 columns

  • pinsleft – List of pin labels for left side

  • pinsright – List of pin labels for right side

  • style – Connector style, ‘round’, ‘square’, or ‘screw’ [default: round]

  • 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. [default: lr]

  • shownumber – Draw pin numbers outside the header

  • pinalignleft – Vertical alignment for pins on left side (‘center’, ‘top’, ‘bottom’) [default: ‘bottom’]

  • pinalignright – Vertical alignment for pins on right side (‘center’, ‘top’, ‘bottom’) [default: ‘bottom’]

  • pinfontsizeleft – Font size for pin labels on left [default: 9]

  • pinfontsizeright – Font size for pin labels on right [default: 9]

  • pinspacing – Distance between pins [default: 0.6]

  • edge – Distance between header edge and first pin row/column [default: 0.3]

  • pinfill – Color to fill pin circles [default: bg]

Anchors:

pin[X] for each pin

class schemdraw.elements.connectors.Jack(*args, **kwargs)

Jack (female connector)

class schemdraw.elements.connectors.Jumper(*args, **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 [default: 0.6]

class schemdraw.elements.connectors.OrthoLines(*args, **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 [default: 0.6]

  • xstart – Fractional distance (0-1) to start vertical portion of first ortholine

delta(dx: float = 0, dy: float = 0) Element

Specify ending position relative to start position

to(xy: Tuple[float, float] | Point) Element

Specify ending position of OrthoLines

class schemdraw.elements.connectors.Plug(*args, **kwargs)

Plug (male connector)

class schemdraw.elements.connectors.RightLines(*args, **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 [default: 0.6]

delta(dx: float = 0, dy: float = 0) Element

Specify ending position relative to start position

to(xy: Tuple[float, float] | Point) Element

Specify ending position of OrthoLines

class schemdraw.elements.connectors.Terminal(*args, **kwargs)

Terminal element

Parameters:
  • r – Radius of terminal [default: 0.18]

  • open – Draw as open circle

Transistors

Transistor elements

class schemdraw.elements.transistors.AnalogBiasedFet(*args, **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(*args, **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(*args, **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(*args, **kwargs)

Bipolar Junction Transistor (untyped)

Parameters:

circle – Draw circle around the transistor

Anchors:
  • collector

  • emitter

  • base

  • center

class schemdraw.elements.transistors.Bjt2(*args, **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(*args, **kwargs)

NPN Bipolar Junction Transistor

Parameters:

circle – Draw circle around the transistor

Anchors:
  • collector

  • emitter

  • base

  • center

class schemdraw.elements.transistors.BjtNpn2(*args, **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(*args, **kwargs)

PNP Bipolar Junction Transistor

Parameters:

circle – Draw circle around the transistor

Anchors:
  • collector

  • emitter

  • base

  • center

class schemdraw.elements.transistors.BjtPnp2(*args, **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(*args, **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(*args, **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(*args, **kwargs)

Junction Field Effect Transistor (untyped)

Anchors:
  • source

  • drain

  • gate

  • center

class schemdraw.elements.transistors.JFet2(*args, **kwargs)

Junction Field Effect Transistor (untyped) which extends collector/emitter leads to the desired length

Anchors:
  • source

  • drain

  • gate

class schemdraw.elements.transistors.JFetN(*args, **kwargs)

N-type Junction Field Effect Transistor

Parameters:

circle – Draw circle around the transistor

Anchors:
  • source

  • drain

  • gate

  • center

class schemdraw.elements.transistors.JFetN2(*args, **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(*args, **kwargs)

P-type Junction Field Effect Transistor

Parameters:

circle – Draw circle around the transistor

Anchors:
  • source

  • drain

  • gate

  • center

class schemdraw.elements.transistors.JFetP2(*args, **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(*args, **kwargs)

N-type Field Effect Transistor

Parameters:

bulk – Draw bulk contact [default: False]

Anchors:
  • source

  • drain

  • gate

  • center

class schemdraw.elements.transistors.NFet2(*args, **kwargs)

N-type Field Effect Transistor which extends source/drain leads to the desired length

Parameters:

bulk – Draw bulk contact [default: False]

Anchors:
  • source

  • drain

  • gate

class schemdraw.elements.transistors.NMos(*args, **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(*args, **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(*args, **kwargs)

P-type Field Effect Transistor

Parameters:

bulk – Draw bulk contact

Anchors:

source drain gate center

class schemdraw.elements.transistors.PFet2(*args, **kwargs)

P-type Field Effect Transistor which extends source/drain leads to the desired length

Parameters:

bulk – Draw bulk contact [default: False]

Anchors:
  • source

  • drain

  • gate

class schemdraw.elements.transistors.PMos(*args, **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(*args, **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(*args, **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) [default: True]

  • loop – Use spiral/cycloid (loopy) style [default: False]

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(*args, **kwargs)

Operational Amplifier.

Keyword Arguments:
  • 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(*args, **kwargs)

D-Type Flip Flop

Parameters:
  • preclr – Show preset and clear inputs

  • preclrinvert – Add invert bubble to preset and clear inputs

Keyword Arguments:

size – Size of the box [default: (2, 3)]

Anchors:
  • D

  • CLK

  • Q

  • Qbar

  • PRE

  • CLR

class schemdraw.elements.intcircuits.Ic(*args, **kwargs)
pin(side: Side = 'L', name: str | None = None, pin: str | None = None, 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)

Add a pin to the IC

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

  • lblsize – Font size for label

side(side: Literal['top', 'bot', 'lft', 'rgt', 'bottom', 'left', 'right', 'L', 'R', 'T', 'B'] = 'L', spacing: float = 0, pad: float = 0.5, leadlen: float = 0.5, label_ofst: float = 0.15, label_size: float = 14.0, pinlabel_ofst: float = 0.05, pinlabel_size: float = 11.0)

Set parameters for spacing/layout of one side

Parameters:
  • side – Side of box to define

  • spacing – Distance between pins

  • pad – Distance from box edge to first pin

  • leadlen – Length of pin lead extensions

  • label_ofst – Offset between box and label (inside box)

  • label_size – Font size of label (inside box)

  • pinlabel_ofst – Offset between box and pin label (outside box)

  • pinlabel_size – Font size of pin label (outside box)

class schemdraw.elements.intcircuits.Ic555(*args, **kwargs)
class schemdraw.elements.intcircuits.IcBox(w, h, y1, y2)
h

Alias for field number 1

w

Alias for field number 0

y1

Alias for field number 2

y2

Alias for field number 3

class schemdraw.elements.intcircuits.IcDIP(*args, **kwargs)

Dual-inline Package Integrated Circuit.

Parameters:

names – List of names for each pin to display inside the box

Keyword Arguments:
  • pins – number of pins [default: 8]

  • notch – Show the notch at top of box [default: True]

  • width – Width of the box [default: 3]

  • pinw – Width and height of each pin [default: 0.6]

  • spacing – Distance between each pin [default: 0.5]

  • number – Show pin numbers inside each pin [default: True]

  • fontsize – Size for pin name labels [default: 12]

  • pfontsize – Size for pin number labels [default: 10]

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, pinlblsize: 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.IcSide(spacing: float = 0.0, pad: float = 0.25, leadlen: float = 0.5, label_ofst: float = 0.15, label_size: float = 14.0, pinlabel_ofst: float = 0.05, pinlabel_size: float = 11.0)

Pin layout parameters for one side of an Ic

class schemdraw.elements.intcircuits.JKFlipFlop(*args, **kwargs)

J-K Flip Flop

Parameters:
  • preclr – Show preset and clear inputs

  • preclrinvert – Add invert bubble to preset and clear inputs

Keyword Arguments:

size – Size of the box [default: (2, 3)]

Anchors:
  • J

  • K

  • CLK

  • Q

  • Qbar

  • PRE

  • CLR

class schemdraw.elements.intcircuits.Multiplexer(*args, **kwargs)
Parameters:
  • demux – Draw as demultiplexer

  • size – (Width, Height) of box

  • pins – List of IcPin instances defining the inputs/outputs

  • slant – Slant angle of top/bottom edges

Keyword Arguments:
  • pinspacing – Spacing between pins [default: 0.6]

  • edgepadH – Padding between top/bottom and first pin [default: 0.25]

  • edgepadW – Padding between left/right and first pin [default: 0.25]

  • lofst – Offset between edge and label (inside box) [default: 0.15]

  • lsize – Font size of labels (inside box) [default: 14]

  • plblofst – Offset between edge and pin label (outside box) [default: 0.05]

  • plblsize – Font size of pin labels (outside box) [default: 11]

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(*args, **kwargs)

A seven-segment display digit.

Keyword Arguments:
  • decimal – Show decimal point segment [default: False]

  • digit – Number to display [default: 8]

  • segcolor – Color of segments [default: red]

  • tilt – Tilt angle in degrees [default: 10]

  • labelsegments – Add a-g labels to each segment [default: True]

  • anode – Add common anode pin [default: False]

  • cathode – Add common cathode pin [default: False]

Anchors:
  • a

  • b

  • c

  • d

  • e

  • f

  • g

  • dp

  • cathode

  • anode

class schemdraw.elements.intcircuits.VoltageRegulator(*args, **kwargs)

Voltage regulator

Keyword Arguments:

size – Size of the box [default: (2, 1.5)]

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(*args, **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 [default: 0.075]

Anchors:
  • tip

  • sleeve

  • ring

  • ringswitch

  • tipswitch

class schemdraw.elements.misc.Mic(*args, **kwargs)

Microphone element with two inputs.

Anchors:
  • in1

  • in2

class schemdraw.elements.misc.Motor(*args, **kwargs)
class schemdraw.elements.misc.Speaker(*args, **kwargs)

Speaker element with two inputs.

Anchors:
  • in1

  • in2

Compound elements made from groups of other elements

class schemdraw.elements.compound.ElementCompound(*args, **kwargs)

Element onto which other elements can be added like a drawing

add(element: Element) Element

Add an element to the segments list

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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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(*args, **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