Reputation: 4208
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!"?
Upvotes: 79
Views: 25163
Reputation: 989
At least on Windows, the gnuplot installer associates the following file extensions with gnuplot:
.gpl
.gp
.plt
Creating these file associations is optional.
Source: https://sourceforge.net/p/gnuplot/patches/552/
Upvotes: 2
Reputation: 347
Worth noting. Visual Studio Code has an extension for gnuplot syntax highlighting. It defines 5 extensions for gnuplot files:
.gp
.gnuplot
.gnu
.plot
.plt
Upvotes: 1
Reputation: 604
Gnuplot uses .gnu
for the demos on their website, so I take that to be the standard.
Upvotes: 15
Reputation: 4560
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.
Upvotes: 60
Reputation: 3406
I don't think that ".gnuplot" should have been accepted as THE answer. There really isn't an answer. I've seen and used ".gp" before which is nice.
Upvotes: 3
Reputation: 5113
what extension most universally declares to human beings "I am a gnuplot script!"?
For that, ".gnuplot
" is hard to beat!
It's not common (probably because it's a bit long) but it unambiguously tells a human being what's inside the tin.
In contrast, wikipedia lists six other file formats with the extension .plt
.
Upvotes: 6