1
1
using NgSpice
2
- using Plots
2
+ # using Plots
3
3
n = NgSpice
4
4
5
5
netpath = joinpath (@__DIR__ , " .." , " inputs" , " mosfet.cir" ) |> normpath
@@ -11,10 +11,11 @@ n.display() # Returns a dataframe of current vectors
11
11
n. listallvecs () # Lists vectors of both active and inactive plots
12
12
n. curplot () # Current active plot
13
13
n. listcurvecs () # Vectors in current active plot
14
- # Vector type can be specified by sending it as a parameter
15
- # plot(n.graph, n.getimagvec, "time", ["emit", "vcc"], "Title of the plot")
16
- sweep = n. getvec (" time" )[end ] # Returns vector info of `time` vector
17
- emit = n. getvec (" emit" )[end ] # Returns vector info of `emit` vector
18
- vcc = n. getvec (" vcc" )[end ] # Returns vector info of `vcc` vector
19
- plot (sweep, [emit vcc], label= [" emit" " vcc" ], title= " Title of the plot" )
20
- n. exit () # Runs "unset askquit" of Ngspice
14
+
15
+ # For plotting the signals, pass `n.graph` an object of `NgSpiceGraphs` type.
16
+ # And then, specify the get-vector method.
17
+ # Pass "time" or "frequency"
18
+ # List of signals to plot
19
+ # Finally, the title of the plot
20
+ # plot(n.graph, n.getimagvec, "time", ["emit", "vcc"], "Simple MOSFET")
21
+ # plot(n.graph, n.getrealvec, "time", ["emit", "vcc"], "Simple MOSFET")
0 commit comments