Plotting SPICE Data
* * * 3 votos
December 2nd, 2006 liewsheng Posted in Electronics, gwave, ngspice | Hits: 8655 |
Last post, I only intro how we can save the data and plot in text files. Actually we can plot the SPICE data in graphical mode, but you will need ‘gwave’ and a SPICE raw file. So go and get gwave:
sudo apt-get install gwave
‘gwave’ is a nice waveform viewer, it capable to read a binary or ASCII files generated by HSPICE, raw file written by SPICE2, SPICE3 and ngspice.
Next you need to generate a raw file, instead of using ‘-o’ you need to use ‘-r’:
ngspice -b circuit.cir -r circuit.out
after the simulation is done, enter this command:
gwave circuit.out
or you can start the gwave, go to menu and click on ‘File->Read File…’ to choose any file you need to open.
Live Chat!









December 2nd, 2006 at 11:35 pm
Hi
I am a newbie to Linux and have tried to understand how to make things work. Finally I found your site that seems as though it will be of a big help. Thanks much.
Andy
December 3rd, 2006 at 3:07 am
Thank you. Hope you enjoy learning at here.
May 9th, 2007 at 3:23 am
Your post had helped me but…
These instructions works fine in a .tran analysis but it does not in a .dc analysis. Can you help me?! I’ve tried using .save and .plot lines and I’ve tried without those lines and I don’t find the way out!
Gwave opens and i have the palette to add traces to plot, but when I add those traces,the values of the X-axis turn to ‘nan’ and nothing is printed.
I think that ‘nan’ stands for ‘not a number’ but I’m not sure.
May 9th, 2007 at 3:42 am
Ok, I’ve partially solved the problem. Not at all but I’ve found an alternative.
I was trying to do the analysis
.dc Vin -10 10 1m
and it was impossible to plot anything. Then I thinked that maybe the problem was with the negative range and I runned
.dc 0 10 1m
and it worked fine!