set title "DEMO GNUPLOT LINUX" set nokey set xrange [0:20] set yrange [0:10] set label 1 "##### # ##### ### ##### #### ### # # # ### ###" at 3.5,9 set label 2 "# # # # # # # # # # ## # # # # # #" at 3.5,8.8 set label 3 "#### # #### # # # # # # # # # # # #" at 3.5,8.6 set label 4 "# # # # # #### # # # ## # # #" at 3.5,8.4 set label 5 "# # # # # # # # # # # # # # # # #" at 3.5,8.2 set label 7 "##### ##### ##### ### # # # ### # # # ### ###" at 3.5,8 set label 8 "(C) Robert Billon, 2001" at 7.5,6 set label 9 "Electronics demo from exemples of Alex Woo web site" at 5.0,4.0 set label 10 "http://www.gnuplot.vt.edu/gnuplot/gpdocs/" at 6.0,3.6 a=10000; b=200000 plot a*x replot -a*x+b replot 10 replot 7 replot 5 replot 0 set nolabel pause 10 reset # # Electronics demo from exemples of Alex Woo web site # http://www.gnuplot.vt.edu/gnuplot/gpdocs/ # $Id: electron.dem,v 1.4 1996/08/13 21:48:22 drd Exp $ # # Adapted by Robert Billon, 2001 # # Bipolar Transistor (NPN) Mutual Characteristic Ie(Vbe)=Ies*exp(Vbe/kT_q) Ic(Vbe)=alpha*Ie(Vbe)+Ico alpha = 0.99 Ies = 4e-14 Ico = 1e-09 kT_q = 0.025 set dummy Vbe set grid set offsets set nolog set nopolar set samples 160 set title "Mutual Characteristic of a Transistor" set xlabel "Vbe (base emmitter voltage)" set xrange [0 : 0.75] set ylabel "Ic (collector current)" set yrange [0 : 0.005] #set key .2,.0045 set key .66,.0052 set format y "%.4f" plot Ic(Vbe) set format "%g" pause 10 # Junction Field Effect Transistor (JFET) Mutual Characteristic # drain current above pinch off Ida(Vd)=Ido*(1-Vg/Vp)**2 ### drain current below pinch off Idb(Vd)=Ido*(2*Vd*(Vg-Vp)-Vd*Vd)/(Vp*Vp) # drain current Id(Vd)= (Vd>Vg-Vp) ? Ida(Vd) : Idb(Vd) # drain current at zero gate voltage Ido = 2.5 # pinch off voltage Vp = -1.25 # gate voltage Vg = 0 set dummy Vd #set nogrid set nokey set offsets 0, 1, 0, 0 set title "JFET Mutual Characteristic" set xlabel "Drain voltage Vd (V)" set xrange [0 : 4] set ylabel "Drain current Id (mA)" set yrange [0 : 5] set label "-0.5 Vp" at 4.1,0.625 set label "-0.25 Vp" at 4.1,1.4 set label "0" at 4.1,2.5 set label "Vg = 0.5 Vp" at 4.1,3.9 plot Vg=0.5*Vp,Id(Vd),Vg=0.25*Vp,Id(Vd),Vg=0,Id(Vd),Vg=-0.25*Vp,Id(Vd) set nolabel pause 10 # show off double axes # amplitude frequency response A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw set grid x y2 set key set logscale xy set log x2 set nolog y2 set title "Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set x2range [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror set y2tics set tics out set autoscale y set autoscale y2 plot abs(A(jw)), 180/pi*arg(A(jw)) axes x2y2 pause 10 # undo what we've done reset