How can I plot transistor currents after a simulation?

I have been adding this

.control
run
remzerovec
display
set color0=white
set xbrushwidth=3
plot V(/diff) V(/vgnd)
plot @m.xm1.msky130_fd_pr__nfet_g5v0d10v5[id] @m.xm2.msky130_fd_pr__nfet_g5v0d10v5[id]
+ @m.xm3.msky130_fd_pr__pfet_g5v0d10v5[id] @m.xm4.msky130_fd_pr__pfet_g5v0d10v5[id] @m.xm5.msky130_fd_pr__pfet_g5v0d10v5[id]
.endc

to your spice netlist and simulated with standard ngspice.

This may be automated by a procedure as described in http://ngspice.sourceforge.net/ngspice-eeschema.html#external, which is using Eeschema for schematic entry and external ngspice for simulation and plotting.

The internal eeschema/ngspice interface is currently very limited. If you would go for Eeschema improvements (C++ coding), I would support this from the ngspice side.

Holger

EDIT: This has been achieved with ngspice from current master branch (soon to become ngspice-33) and adding

set ngbehavior = hski

to .spiceinit.