White background plot

I think that it was clear that in simulation I need to plot voltage and/or current.

Here you can see plot with black background I need to change in white.

Clearly obvious to you, but I would have missed it without eelik’s edit, which he added when I was halfway my post.

I had a look through the settins of KiCad’s integrated spice simulator, but I could also not find anything relevant.
I was curious about a wishlist for simulation features, but am not even sure whether to look at gitlab or github for the moment.

So for now I only see 2 workarounds. Either save a picture (or .svg?) from within the simulator and post process with a suitable program (simple command line program to invert colors?) or:
Spice Simulator / Simulation / Show Spice Netlist and then copy / paste into another simulator to redo the simulation, or save the netlist directly from Eeschema / Tools / Generate Netlist File / Spice

In nightly build this feature (switch black/white background) is already available. Then I suppose there is a way to do in 5.1.5.
And I found here in page 11

Example:
set color0 = white ; background color
set color1 = blue ; text and grid color

that sound similar to what I need. I tried to insert these in “text box” in my schematic without any effect. Not sure I understood well but it seems they are “command” .

May be you’re right but I don’t see anything else to plot in simulation but voltage and current.

ngspice in KiCAD and ngspice stand-alone are two different things.

ngspice plotting in KiCAD/Eeschema is exclusively handled by Eeschema only. I do not know of any color selection switch available in 5.1.5. Standalone ngspice plotting is switched off. Thus the ngspice manuals with their chapters and rules about plotting are not valid.

As paulvdh said, there is a way to use standalone ngspice from within Eeschema. Please have a look at http://ngspice.sourceforge.net/ngspice-eeschema.html#external for some hints about the procedure. Then you will have all the ngspice commands available for plotting.

The next ngspice release, ngspice-32, due early April, will have full color capability for background, grid/text and graphs.

1 Like

Another alternative is using the ngspice ‘gnuplot’ command within Eeschema/ngspice.

Take the laser driver example from /usr/share/kicad/demos/simulation/laser_driver as an example.

Before starting Eeschema from the bash window, set the locale for the bash session by

export LC_NUMERIC="C"

After starting Eeschema and loading the example, replace the text in the textbox of the Eeschema window

.tran 10p 150n

by

.tran 10p 150n
.control
set controlswait
gnuplot gpp V("/out") V("/in")
.endc

The output file name ‘gpp’ is arbitrary. Gnuplot offers a white background. Without the locale setting, and not being in the US, gnuplot may fail opening.

1 Like

Very good. Hope it will be possible to manage horizontal and vertical zoom independently too.

Unfortunately I can’t install gnuplot because of conflict with Qt5. Ill wait for ngspice 32.

Just updated to 5.1.8 and white background of simulation plot is still unavailable. Or I missed it.
Any hint to obtain white background in stable release?

He was talking about standalone ngspice, not the ngspice interface built into KiCad:
https://sourceforge.net/projects/ngspice/files/ng-spice-rework/33/

Then I have two questions:

  1. is there any way in 5.1.8 (the current stable release) to have white background in simulation plot?

  2. given that in nightly this feature is available when it will be available in a stable release? Hope before in version 6.

I’m sorry. I do not know enough to answer those questions. Maybe someone else can?

5.1.x releases are bugfix releases, no new features.

The nightly builds are daily development “releases” which will lead to the next stable x.y version which at this time will be 6.0. So all new features which are now available in the nightly builds will be in 6.0 but not earlier.

1 Like

Any idea on when version 6 will be available?

I heard some rumors about FOSDEM 2021 being target date so February 2021

I think it was for rc1, but the history shows that we shouldn’t hold our breaths, and even after rc1 the final release can take several months. But of course this time it may be different, and if people test and report bugs diligently it will be sooner.

1 Like

Thanks for answers .

I seldom use the simulation (preferring LTspice) but, on the few occasions when I do use it, I save the Image and use an external program to Invert the colors… That gives me something I can print on paper…

I know that LTspice is good in simulation but this need to draw a copy of schematic in LT too

Good idea waiting for the feature in KiCad.

Here’s a tip:

See the Blue comments in attached image. Thus, no need to
build the schematic in LTspice. Simply use the Netlist from Kicad…

EDIT: No need to paste the code if running LTspice from Kicad (as long as
you saved the Netlist as .CIR) :grinning:

This is a real improvement, LT become like a KiCad plugin.
I’m using KiCad in Linux then the steps are slightly different but I simply open KiCad netlist using LTspice installed in Wine ad all works. Thanks a lot.
Now I’ll search for the right command to run simulator from KiCad.

I’m using a Mac and it shouldn’t be much different. Simply grab the location of the LTspice app and paste it into the cmd field…