File talk:Series RC resistor voltage.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Generated with the following Python script under matplotlib and touched up slightly in Inkscape.

#!/usr/bin/env python

from pylab import *
rc("font", family="serif", size=16)
rc("xtick", labelsize=16)
rc("ytick", labelsize=16)
rc("axes", titlesize=18, labelsize=16)


R = 100.0
C = 0.000001
tau = R*C

t = arange(0, 5*tau, tau/200)
hc = exp(-t / tau)

grid()
setp(gca(), 'axisbelow', True)
setp(getp(gca(), 'xgridlines'), 'color', '#d7d7d7', 'linestyle', '-')
setp(getp(gca(), 'ygridlines'), 'color', '#d7d7d7', 'linestyle', '-')
yt,junk = yticks((0.007, 0.018, 0.05, 0.135, 0.368), ("0.7%", "1.8%", "5%", "13.5%", "36.8%"))
yt[0].set_pad(-476)
yt[2].set_pad(-476)

xticks((0, tau, 2*tau, 3*tau, 4*tau, 5*tau), ("0", r"T", r"2T", r"3T", r"4T", r"5T"))
xlabel("Time")
ylabel(r"$V_r$")

plot(t, hc)
savefig("Series RC resistor voltage.svg")