I need to plot the voltage in the Y axis and the current in the X axis in ngspice, like X-Y mode in an oscilloscope. I could not find anything regarding this in the manual. Can this be done? If so, how?
Fortunatelly ngspice has the 'vs' operator. So if I want to plot let say, voltage at node "in" versus current at resistor R1, I do:
plot v(in) vs @r1[i]
assuming both v(in) and @r1[i] are saved vectors. The operands could also be any voltage or current in the circuit, so you could also plot VxV, IxI, etc.