Printing and Plotting in ngspice: All these commands and variables you can set are in the ngspice manual. Plotting is to the screen, printing is to a postscript file or a printer. One simple way is to setup your printing is like this: ================================================================ .control tran 100ps 50ns set hcopydevtype=postscript plot V(tline_input) V(tline_output) xl 1ns 50ns hardcopy temp.ps V(tline_input) V(tline_output) xl 1ns 50ns .endc The plot command will plot color vectors on a black background to your screen. The colors used will be in the order red, blue, ...etc. The hardcopy command will print the postscript file temp.ps to a postscript printer. The temp.ps file is printed with dashed and dotted lines to distinguish the different vectors. ================================================================ ================================================================ To get colored vectors on a white background for the on-screen plot, you would do the following: ================================================================ .control tran 100ps 50ns set hcopydevtype=postscript set color0 = rgb:f/f/e ;background, a nice color of off-white set color1 = rgb:/1/1/1 ;text and grid almost black set color2 = rgb:f/0/0 ;vector0 set color3 = rgb:0/f/0 ;vector1 set color4 = rgb:0/0/f ;vector2 plot V(tline_input) V(tline_output) xl 1ns 50ns hardcopy temp.ps V(tline_input) V(tline_output) xl 1ns 50ns .endc Oddly enough, these settings will not result in a color printout from the postscript file temp.ps. If you wish to print colored vectors, background and grid traces on a white background from temp.ps, you must include the command: set hcopypscolor = 0 Note that : set hcopypscolor=true will not work I have also found that: hcopypscolor = 1 gives a black background hcopypscolor = 2 gives a red background hcopypscolor = 3 gives a green background hcopypscolor = 4 gives a blue background In addition, specifying either white or black does not work as expected. ================================================================ ================================================================ Instead of sending your printing to a .ps file, you can send it directly to a printer by including the command: set hcopydev= For example, set hcopydev=kec3112-clr ;send output to printer kec3112-clr So, to have colored plots on-screen and to be able to send them to the printer as colored vectors, and print the plot to a file we would have the following: ================================================================ .control tran 100ps 50ns set hcopydevtype=postscript set hcopydev=kec3112-clr ;send output kec3112-clr set hcopypscolor = 0 set color0 = rgb:f/f/e ;background, a nice color of off-white set color1 = rgb:/1/1/1 ;text and grid almost black set color2 = rgb:f/0/0 ;vector0 set color3 = rgb:0/f/0 ;vector1 set color4 = rgb:0/0/f ;vector2 plot V(tline_input) V(tline_output) xl 1ns 50ns hardcopy temp.ps V(tline_input) V(tline_output) xl 1ns 50ns .endc ================================================================ ================================================================= Sometimes, a plot line will be on an axis and is almost invisible even when colored. Widening the plot line is easy to do: set xbrushwidth=3 or some other value. It seems that the default is 2. ================================================================= ================================================================= ================================================================ Those using Windows based ngspice can only change the plot background color. From the manual (rework 23), page 286. ... "colorN These variables determine the colors used, if X is being run on a color display. N may be between 0 and 15. Color 0 is the background, color 1 is the grid and text color, and colors 2 through 15 are used in order for vectors plotted. The value of the color variables should be names of colors, which may be found in the file /usr/lib/rgb.txt. ngspice for Windows does support only white background (color0=white with black grid and text) or or color0=black with white grid and text." If anybody figures out more ways to do printing from ngspice, please mail me: traylor AT ece DOT orst DOT edu