![]() This is a issue with the terminal itself, not gnuplot. If you're using the 'x11' terminal, the plots disappear immediately after gnuplot exists (which is immediately after the script is complete). For example, if you're using the 'aqua' terminal, the plots will persist after gnuplot exits. Quote:Originally posted by shamlen:(just as an aside, I heart gnuplot even though it's not actually licensed under the gnu gpl) It's a fabulous piece of kit!quote:to tell you which gnuplot you're using, try:$ which gnuplot Doesn't that just tell you where the executable is, as opposed to what version it is?quote:Also, depending on what the default terminal type is will depend on the plot outputs when running scripts. I tested these on my macbook with 'gnuplot 4.2 patchlevel 4' from macports 1.700 and didn't have any problems. ![]() Alternatively, you can add a 'pause -1' command at the end of the script to wait for a carriage return before continuing.Let me know what (if anything) works for you. This is a issue with the terminal itself, not gnuplot.If gnuplot works to plot your script from the interactive mode:gnuplot> load('myscript.gnuplot') Then try running gnuplot from the commandline with the -persist option:$ gnuplot -persist myscript.gnuplot The persist option is required if you're running using the 'x11' terminal. ![]() (just as an aside, I heart gnuplot even though it's not actually licensed under the gnu gpl)to tell you which gnuplot you're using, try:$ which gnuplotAlso, depending on what the default terminal type is will depend on the plot outputs when running scripts. For this example, the plot command creates a line chart from the $Mydata variable ( Figure 1).Quote:Originally posted by St.John:quote:Originally posted by SkiingOnMars:The "is it plugged in" question: are you using the latest version (1.7.0) of MacPorts (as opposed to darwinports)? I think so:john$ portÄ®ntering interactive mode. The end-of-data delimiter ( EOD here) can be any sequence of characters. To plot four sets of data points in a line chart, you could enter: $ gnuplotÄata block names must begin with a $ character, which distinguishes them from other types of persistent variables. Gnuplot is typically run as a command-line utility, but it can also be run manually, with the charting instructions and data values inserted inline. To install Gnuplot on Ubuntu, enter: sudo apt-get install gnuplot Gnuplot can be installed on Linux, Windows, and macOS. In this article, I introduce Gnuplot with two dynamic examples: The first shows the status of Raspberry Pi I/O pins, and the second is a line chart of CPU diagnostics. In only 20 lines of scripting code, I was able to create real-time line and bar charts. Gnuplot is a command-line charting utility that has been around for a while, and I was amazed how easy it was to get up and running. Some excellent charting and plotting packages can be found, but if you're like me, you sometimes just want to do a quick dynamic test plot without a lot of custom setup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |