wire: Draw a wire

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Draw a wire

Usage

1
2
3
wire(x0, y0, x1, y1,
     points=FALSE,
     col=par('col'), lwd=par('lwd'), cex=par('cex'))

Arguments

x0,y0

starting coordinate of element

x1,y1

ending coordinate of element

points

booline indicating whether to draw dots at the ends of the wire

col

colour

lwd

line width

cex

size of points (ignored unless points is TRUE)

Details

The coordinate system has both x and y ranging from 0 to 1.

Value

Vector containing x0, y0, x1, y1.

Author(s)

Dan Kelley

See Also

The plot must first be set up with circuit.

Examples

1
2
3
4
5
6
library(circuit)
circuit()
resistor(0.1, 0.5, 0.4, 0.5, label="10k")
capacitor(0.4, 0.2, 0.4, 0.5, label='10uF')
wire(0.4, 0.5, 0.7, 0.5)
ground(0.4, 0.2)

dankelley/circuit documentation built on May 14, 2019, 4:09 p.m.