For LTspice, one can use Python and the
PyLTSpice Python module to read the simulation files, save the data in Gnuplot-friendly format (see RawRead), and then execute Gnuplot to plot the saved data file.
(Why not do the plotting directly from within the Python script? Because you will be more efficient by keeping individual tools simple and separate, and chain them, than by combining them into a single program. KISS and Unix philosophy are time-tested. After all, you
are asking how to do your own plots, having found whatever LTspice provides lacking for this use case.)
I don't have LTspice installed, but if someone uploads a .raw file of some simulation, I can write a Python 3 script for converting those to Gnuplot-friendly text format and interactive plotting.
I use Gnuplot extensively, and keep a tab open to the user manual (
5.4 PDF,
6.0 online; see
http://gnuplot.info/ for more). The
plot and
splot (3D) plotting commands are quite powerful, as is the
fit command. When doing interactive plotting in a script, the
pause command is particularly useful. If you create a plot for documentation, I recommend doing it interactively first, then switching to SVG output and
replot'ing. SVG is a vector format, so stays sharp at any size, and you can edit them in e.g. Inkscape. (You'll need to
Edit >
Ungroup objects before you can modify individual elements.)
For Spice simulations, I use
ngspice through KiCad. It uses a text output format compatible with Gnuplot. That output format is also extremely easy to read/modify/write/generate in awk; for example in
GNU Awk (usually called
gawk), although
mawk tends to be faster if you use an SBC like RPi. It is also trivial to read into lists in Python; however, I do recommend outputting the data into a text file and using Gnuplot the external program, rather than writing Python programs that redraw the graphs (even using libgnuplot).
In non-Windows operating systems there are tools like
inotifywait and
fswatch that can monitor when any process closes a watched file (or any file in a watched directory) having it open for writing, i.e.
CLOSE_WRITE event for
inotifywait. This makes it very easy to write one-line shell (command-line) commands that run a program, for example Gnuplot, whenever a process closes a file that it opened for write access. It is much more reliable than checking file timestamps, because modification timestamps are updated even while the process has the file still open, so there is no guarantee the modifications are complete immediately after the modification timestamp changes. (While
fswatch does support Windows, it does not support this on Windows, and only tries to emulate it by monitoring the file timestamps; the close-write event should work in Linux, Android, FreeBSD, OpenBSD, and macOS.)