I have the following circuit. I try to find a way to combine the all plots into a single one (like ltspice's .step card). Unfortunately I couldn't get the example from the ngspice's manual working.
I would be grateful if anyone could help me understand the logic behind what I am trying to achieve. I think I need to force my vectors to be stored in a single plot but from my research I found more than one way of doing that (I just cannot understand the logic of those examples so I couldn't adapt them for my circuit)
I use ngspice 35
.TITLE AC test
.INCLUDE ../../lib/lm393.sub
x1 in 0 1 0 out lm393
c1 in 0 100n
r1 1 in 100k
c2 out 0 100n
r2 1 out 4.7k
vsup 1 0 DC 5
vin in 0 AC 1
.CONTROL
*foreach x 1n 10n 50n 100n
* alter c1 = $x
* ac dec 100 1 100k
*end
alter c2 = 10n
ac dec 100 1 1Meg
alter c2 = 100n
ac dec 100 1 1Meg
alter c2 = 1u
ac dec 100 1 1Meg
alter c2 = 10u
ac dec 100 1 1Meg
plot db(ac1.out) db(ac2.out) db(ac3.out) db(ac4.out)
.ENDC