Plotting SPICE Data

December 2nd, 2006 liewsheng Posted in Electronics, gwave, ngspice | Hits: 33752 | 6 Comments »

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.

6 Responses to “Plotting SPICE Data”

  1. 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.


  2. Thank you. Hope you enjoy learning at here.

  3. Jordi Perelló Says:

    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.

  4. Jordi Perelló Says:

    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!

  5. i need a software like easyplot or ezplot for the operating system linux…. can any one help me with that?

  6. ma2052 wordpress com

Leave a Reply