Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a standard file extension for gnuplot files?

I have seen .gnu, .plt, and .gplot as file extensions for gnuplot scripts.

I know Linux doesn't care about file extensions, but what extension most universally declares to human beings "I am a gnuplot script!"?

like image 291
Philip Avatar asked Mar 31 '11 09:03

Philip


People also ask

How do I open a gnuplot file?

You can run a script two ways: Type load "scriptname" from within gnuplot. Or, from UNIX, run gnuplot by typing gnuplot scriptname . In this method, gnuplot will exit when your script is finished, so you may want to include PAUSE -1 "Hit any key to continue" as your last line.

Is gnuplot part of GNU?

gnuplot is not related to the GNU project or the FSF in any but the most peripheral sense. Our software was designed completely independently and the name "gnuplot" was actually a compromise.

Is gnuplot suitable for scripting?

- Yes. Gnuplot is suitable for scripting. - The scripts can be read by gnuplot during an interactive session. - It also runs in batch mode.


2 Answers

As Romain, Dr. Person and neillb all point out and this wikibooks article confirms, there is no official standard extension for gnuplot files.

These three file extensions do seem popular:

.gpi .plt .gp 

Of these .gp is shortest and seems like it would have the fewest collisions with other programs. But the other two extensions aren't in heavy use either. It appears that .plt was used by HPGL plotters and therefore some old Autocad files may have this extension. And files with a .gpi extension are used by Garmin GPS devices. Fwiw, googling for "gnuplot file extension gp" returns a few more results than similar searches for .gpi and .plt

While .gnuplot is a fair choice, it is seven characters long. Long file extensions can potentially detract from readability in the terminal because they open up the possibility of file names that are shorter than the file extension and because longer extensions are more likely to cause lines to wrap.

like image 89
Noah Sussman Avatar answered Sep 21 '22 00:09

Noah Sussman


vim recognises .gpi, for more see Gnuplot Wikibook.

like image 34
David Richfield Avatar answered Sep 20 '22 00:09

David Richfield