#!/usr/bin/python3 import sys from numpy import linspace, exp from matplotlib.pyplot import plot, xlabel, ylabel, savefig, rcParams def plot_rc(tau, outfilename): rcParams["pdf.use14corefonts"] = True rcParams["ps.useafm"] = True # analogous to use14corefonts for PS/EPS t = linspace(0, tau * 6) plot(t, exp(-t / tau)) xlabel("time (seconds)") ylabel("fraction of initial $V$") savefig(outfilename) if __name__ == '__main__': plot_rc(tau=0.1, outfilename='rc.svg' if len(sys.argv) == 1 else sys.argv[1])