AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Gnuplot commands1/6/2024 Perfectly well with more modern terminals like lxterminal, uterminal, Should be required to run ngspice since, as I have shown above, it works I can even just press "q" and the plot will disappear with noįinally, I will apt-get install an xterm (which is not something that It pops up a nice plot and returns my command prompt so that I can continue Here is what happens with my modified version: Running it in a terminal and I don't need another one) Work unless the usr has also installed xterm (notice that I am already In other words, the default installation from the apt repository does not Will be a precompiled version of the source code that I already explainedįirst here is a simple half-wave-rectifier net list that I will use as an Okay, I just did the usual apt-get install of ngspice, but clearly that Which results it much more usable plot size and good fonts. "LANG=C.UTF-8 xterm -fa 'DejaVu Sans Mono' -fs 14" Replacing the hardcoded "xterm -e gnuplot %s - &" string by a Of course, I can just continue to have my students change theĪbove line by hand and recompile from the source every semester but IĪm pretty sure we are not the only ones who run ngspice from the I had to install both gnuplot and xterm on Ubuntu before I could Line and it will just execute gnuplot -p and not make calls to otherĮxecutables like "xterm" which may not even exist. Will automatically detect that you are running on the linux command In any case, I was hoping somebody would modify the code so that it However, a recompile is good anyway as at least Ubuntu 18.04 Use of apt-get is a lot simpler than to recompile ngspice, With the original command they can do this immediately. Writing "set term png" in the t file followed by "gnuplotīlah.plt > blah.png" on the command line for example) They like, to produce pdf, jpg, png, latex, etc, file by simply Will properly spit out a nice graph on x11 (along with a blah.dat dataįile and a t plot file which can then be modified later, if (void) sprintf(buf, "gnuplot -p %s - &", filename_plt) Īnd then they recompile everything. Xterm') and provides a separate session where the plot can beĪlways make the students modify the above line of the source code to The command works fine under Ubuntu 18.04 (after 'sudo apt-get install Of course, I can just continue to have my students change the above line by hand and recompile from the source every semester but I am pretty sure we are not the only ones who run ngspice from the command line on a linux computer.Įven if they did, ngspice should not call it in thisĬase since ngspice is already being executed inside a terminal. In any case, I was hoping somebody would modify the code so that it will automatically detect that you are running on the linux command line and it will just execute gnuplot -p and not make calls to other executables like "xterm" which may not even exist. We use the command line on linux laptops and also on raspberry pi's (the different computers are all running various linux versions, like lubuntu, arch, raspbian, etc) and since we do everything on the command line, we simply type "ngspice blah.png" on the command line for example) I have students use ngspice in a number of my electrical engineering courses and everyone absolutely loves it. Hi everyone, I am new to the ngspice developers forum but I wanted to mention something that I am hoping someone might change.
0 Comments
Read More
Leave a Reply. |