Consider the output of an optocoupler in series with a 27k resistor connected to a fixed voltage of 66V.

In LTSpice I am able to plot the current in this circuit as a function of the input signal. However I need the equivalent resistance value. In other words 66V divided by the current found. I can not find the way to do that in LTSpice.

I am able to transfer the plot data to Excell and handle it over there but it would be nice to solve the situation in LTSpice.

In short: Is there a way to modify the plot Y axis from current to resistance?

  • 1
    \$\begingroup\$ plot V(node)/I(node) ? or right click on the Y axis and change the quantit plotted to something? \$\endgroup\$
    – PlasmaHH
    Feb 21, 2018 at 15:17
  • \$\begingroup\$ @PlasmaHH Being new to LTSpice I did not know how to do it. But your comment solved the problem. \$\endgroup\$
    – Decapod
    Feb 21, 2018 at 15:26
  • \$\begingroup\$ Just like any SPICE software, you are able to change the axes (plural for axis, English is weird). Instead of, say, V(node) as the default output node of your transient analysis, I(node) would would take its place. This can be configured under your analysis management tool. LTSpice has a weird way of configuring simulations, I agree. But if you're able to interpret the .tran x y blah blah blah syntax, you can figure out how to plot anything without going through the editor tool. \$\endgroup\$
    – user103380
    Feb 21, 2018 at 16:19
  • \$\begingroup\$ @KingDuken I challenge you to come up with a plotting directive. The .tran has as far as I know only options concerning the simulation but not for the plotting: .TRAN <Tstep> <Tstop> [Tstart [dTmax]] [modifiers] and the modifiers do not contain "plot xyz" \$\endgroup\$
    – Arsenal
    Feb 21, 2018 at 16:37
  • \$\begingroup\$ @Arsenal thanks for the correction. I couldn't remember the proper format and parameters from LTSpice on the top of my head. \$\endgroup\$
    – user103380
    Feb 21, 2018 at 17:06

1 Answer 1


That is quite possible if I understood you correctly. Just like PlasmaHH pointed out in the comment.

Take this example circuit:


What you like to know is the equivalent resistance of the resistor and transistor, which changes based on the voltage going to base of the transistor.

Now what you easily get is the current waveform by clicking on the resistor:

Current waveform

Of course that is not what you are looking for. As you see I named the net at the top to V66 because this makes it easier to get the correct node for the next step.

In the plot window you can now right click on the I(R1) (or add a new Trace with the menu or Ctrl+A) at the top which gives you an expression editor, where you can write some nifty formulas. An easy one for this problem is: V(V66)/I(R1) which will give you this:

Resistance plot

Which is (hopefully) what you want.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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