I have a transient simulation for a simple voltage divider for MacSPICE shown below. I'm able to plot certain variables under test vs. time. How can I do a current vs. voltage plot for the transient data?

Voltage Divider - Sine

vin 1 0 sin (0.0V 1.0V 50) ac 1.0 dc 0.0
r1 1 2 1.0K
r2 2 0 1.0k

* dispose of any 'save' statements from previous runs
delete all
tran 0.1ms 20ms
plot v(1) v(2)
plot -i(vin)

  • \$\begingroup\$ To clarify, this isn't actually about HSPICE, just SPICE in general, right? \$\endgroup\$ – W5VO Sep 19 '16 at 16:44
  • \$\begingroup\$ Correct. I just didn't want any GUI-based solutions, like for LTSPICE and PSPICE. \$\endgroup\$ – herrtim Sep 19 '16 at 16:49

The command:

plot -i(vin) vs v(1)

is what you need.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.