Questions tagged [gnuplot]

Gnuplot is a portable command-line driven graphing utility for linux, OS/2, MS Windows, OSX, VMS, and many other platforms. Use this tag for questions about programmatic use of Gnuplot; debugging interactive usage is off-topic.

Gnuplot is a command-line driven plotting engine that runs on all major operating systems (Windows, GNU/Linux, OSX, etc.). Its initial release dates back to 1986 and it is still being actively developed. The program is written in and is released under a custom open source license.

Gnuplot provides a large array of styles to produce different plots including plots popular in mathematics, statistics, or even financial analysis. It can also produce various plot styles for three dimensional data including surface and contour plots. It is capable of plotting user defined functions or specific data and can even generate data through various facilities if needed.

There is no graphical user interface contained in the official release, but several external ones are available (e.g. wgnuplot, xgfe, PlotDrop,...). Additionally there are interfaces available for multiple programming languages such as C, , , and (see more information in links below). There are several software suites that use Gnuplot as plotting device. Amongst them are GNU , and . Mostly however, Gnuplot is used via scripts which automate the task of generating graphics.

Gnuplot produces output using custom output devices called terminals which are available for interactive use, most popular raster formats, various vector formats (including SVG), and both postscript and pdf. Terminals are even available for various LaTeX package formats for direct inclusion into LaTeX documents allowing the document processor to do the typesetting of figure annotations or having the annotations done by gnuplot itself.

Gnuplot is a powerful tool as it allows the customization of nearly every parameter of the plot. Recent versions even support limited but powerful programming features including command line arguments for scripts, conditional and looping statements, and the ability to do smoothing or basic statistical calculations on data.

Gnuplot demos

enter image description here enter image description here

Links

Gnuplot Blogs

Gnuplot Books

6701 questions
226
votes
10 answers

Histogram using gnuplot?

I know how to create a histogram (just use "with boxes") in gnuplot if my .dat file already has properly binned data. Is there a way to take a list of numbers and have gnuplot provide a histogram based on ranges and bin sizes the user provides?
mary
  • 2,577
  • 5
  • 19
  • 11
165
votes
10 answers

How to pass command line argument to gnuplot?

I want to use gnuplot to draw figure from data file, say foo.data. Currently, I hardcoded the data file name in the command file, say foo.plt, and run command gnuplot foo.plg to plot data. However, I want to pass the data file name as a command…
Yun Huang
  • 4,256
  • 7
  • 27
  • 36
139
votes
15 answers

Octave-Gnuplot-AquaTerm error: set terminal aqua enhanced title "Figure 1"...unknown terminal type"

I've installed Octave and gnuplot via Homebrew, and downloaded AquaTerm.dmg. When I try to plot, I get the following message: octave:4> plot(x,y) gnuplot> set terminal aqua enhanced title "Figure 1" font "*,6" ^ `line 0:…
PGreen
  • 3,239
  • 3
  • 24
  • 29
113
votes
5 answers

How do you plot bar charts in gnuplot?

How do you plot bar charts in gnuplot with text labels?
tatwright
  • 37,567
  • 6
  • 21
  • 9
93
votes
8 answers

gnuplot vs Matplotlib

I've started on a project graphing Tomcat logs using gnuplot-py, specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on gnuplot-py vs Matplotlib for Python graphing. Are there…
Ethan Heilman
  • 16,347
  • 11
  • 61
  • 88
93
votes
6 answers

Loop structure inside gnuplot?

Is there any way to iteratively retrieve data from multiple files and plot them on the same graph in gnuplot. Suppose I have files like data1.txt, data2.txt......data1000.txt; each having the same number of columns. Now I could write something…
Slayer
  • 2,391
  • 4
  • 21
  • 18
93
votes
3 answers

gnuplot : plotting data from multiple input files in a single graph

I am trying to plot a graph using gnuplot. I have six text files. Each text file contains two columns. The first column represents time in seconds (a floating point number). The second one is a sequence number. I want to plot the graph of time vs.…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
78
votes
9 answers

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!"?
Philip
  • 4,128
  • 5
  • 31
  • 49
75
votes
6 answers

How do I plot list of tuples in Python?

I have the following data set. I would like to use Python or Gnuplot to plot the data. The tuples are of the form (x, y). The Y-axis should be a log axis, that is, log(y). A scatter plot or line plot would be ideal. How can this be done? [(0,…
olliepower
  • 1,269
  • 2
  • 11
  • 17
71
votes
1 answer

Haskell Array.Accelerate - forkOS error

Trying to plot the output of some Data.Array.Accelerate computations with gnuplot I encountered a strange problem. When run via the interpreter everything is fine, as is plotting straight Haskell data or just printing the Accelerate values, however…
user328062
71
votes
1 answer

Gnuplot line types

How do I draw different types of lines on gnuplot? I got to draw different colors. My script joins several files and I think it is why the lines are not dash. Only two of four are dashed. Thanks Felipe #!/usr/bin/gnuplot set grid set title 'Estado…
Felipe
  • 7,013
  • 8
  • 44
  • 102
68
votes
2 answers

Plotting using a CSV file

I have a csv file which has 5 entries on every row. Every entry is whether a network packet is triggered or not. The last entry in every row is the size of packet. Every row = time elapsed in ms. e.g. row 1 , 0 , 1 , 2 , 117 How do I plot a graph…
user494461
60
votes
3 answers

How to change dot size in gnuplot

How to change point size and shape and color in gnuplot. plot "./points.dat" using 1:2 title with dots I am using above command to plot graph ,but it shows very small size points. I tried to use command set pointsize 20 but still point size is…
user69910
  • 971
  • 2
  • 9
  • 14
56
votes
3 answers

output.png from gnuplot is not as good as the figure from prompt shell

I often plot graphs in gnuplot prompt shell, like this: gunuplot> plot sin(x) with linespoints pointtype 3 and the figure showed up is great. Today, I save the graph in a .png file, like this: gnuplot> set term png gnuplot> set output…
Alcott
  • 17,905
  • 32
  • 116
  • 173
56
votes
4 answers

gnuplot legend overlaps graph

Essentially, the problem that I am experiencing is that the legend overlaps the gnuplot graph that I am trying to plot as illustrated in the following diagram. Following is the command that I am using to plot the data. > set log y > plot…
Bill
  • 772
  • 3
  • 8
  • 16
1
2 3
99 100