I have no idea what "xl7" is or is meant to do, but I would
be looking for something like
deriv(I(xm8.mo.d)/deriv(v(whatever_the_gate_node_is)
in simulator-appropriate syntax for gm, and plot it vs
the drain current (or dump them both to a spreadsheet,
stepwise, maybe by a .print imported).
Start simple, until you can get at the drain current
and Vgs you're nowhere. Once you have that syntax right
the rest should be straightforward (other than the bit about
no idea regarding xl7).