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
2
votes
2 answers

Filledcurves between different scaled y-axis

I have to "reinvent" a diagram like the following: My problem is, the "filledcurves" option does not work correctly, if I use the different scaled y-axis. set y2tics textcolor rgb "black" set ytics nomirror set yrange [0:80] set y2range…
2
votes
2 answers

How to stop gnuplot from grabbing focus of active window? (Windows)

As a follow up to this question here. I am calling pgnuplot using batch operation from a perl script, i.e. perl generates a plotting script, then it invokes gnuplot with the generated script and the output is a postscript file. This causes the…
devil
  • 1,829
  • 16
  • 23
2
votes
3 answers

Different scale for negative and positive values in y-axes - Gnuplot

Is it possible to plot a graph using different scale for negative and positive values in y-axes in Gnuplot? I want to set the y range of the values in the y-axes from -2 to 70. For values from 0 to 70 I want a scale e.g. 0,10,20,30,..70. For values…
v1mm3r
  • 57
  • 1
  • 12
2
votes
1 answer

Gnuplot: logarithmic axes and dgrid3d not working together

I have a sparse grid of data that I would like to plot with a log scale in the x and y axes, with colours and contours defining the z axis. Using logscale xy results in a very different looking plot to when I plot a linear plot of the log of each…
masher
  • 3,814
  • 4
  • 31
  • 35
2
votes
0 answers

Gnuplot - transparent surface plot without lines

I am plotting a transparent surface using pseudofile '++' (gnuplot 5.2): set isosample 100 set style fill transparent solid 0.65 splot [0:5][0:5] '++' u 1:2:(sin($1)*sin($2)) w pm3d but it results in a plot with both lines around each tile of the…
Joce
  • 2,220
  • 15
  • 26
2
votes
2 answers

gnuplot move data point on x axis

i am plotting the attached graph using following script and data set: set term postscript enhanced color solid set output "speedup_v1.ps" set title "Speedup" set key left top set yrange[0:128] set xtics (0,1,2,4,8,16,32,64,128) set xlabel…
imbaer
  • 554
  • 3
  • 21
2
votes
2 answers

gnuplot: Projecting axes labels and tics on the xy plane of an splot

I would like to know if there is a way of projecting the x and y axes labels and tics on the xy plane of an splot using gnuplot. This example shows what I want: which contrasts to what I currently have: Note how in the top image the label seems…
mroavi
  • 119
  • 2
  • 9
2
votes
0 answers

How to draw a trend line by using gnuplot?

I was trying to use gnuplot to plot a bunch of data. (data from txt file or csv file) Then, I tried to draw a trendline of those data. However, it doesn't work. The data was originally from a Microsoft Excel file. I saved them as .txt file and .csv…
2
votes
1 answer

gnuplot curve from file and parametric sphere

I am trying to plot in a 3d space a curve coming from a file and a sphere made with parametric entries. The idea is to plot the planet Earth and the orbit of a satellite. The orbit is defined in a file x y z and gnuplot commands are simply splot…
2
votes
1 answer

Gnuplot - fitting function to a certain value, problem with the last (first) row of data file

Of late I have been troubling with two issues during some simple plotting. I'm trying to plot several functions (I suppose the syntax for that can be much simplier), where every one of them fits to just one row of data. Data file: 11[V] 2.92 4.64…
tjzel
  • 115
  • 5
2
votes
1 answer

High resolution scatterplot in GNUPlot?

I usually take the tikz-pgfplot route through gnuplot-lua interface to draw scientific figures for research papers. It usually works very good and I can seamlessly integrate my figures in latex documents. The figures thus produced is very high…
Madhurjya
  • 497
  • 5
  • 17
2
votes
3 answers

gnuplot: How to parse input numbers with unit suffixes (m/g for mega/gigabytes)?

In the data of memory usage over time, the memory size is in bytes m or g. How to tell Gnuplot that if it sees m it should multiply the number by 1024^2 and 1024^3 for the g suffix? Example: 0 360m 1.1g Thank you!
Jakub Holý
  • 6,019
  • 3
  • 33
  • 33
2
votes
1 answer

Gnuplot: change font size for plot with labels

I would like to be able to control the font size for the labels produced by plot file u 1:2:(sprintf("%4.3f", $1)) with labels offset char 0,2 t "" but have not found a way yet. Let me add that I use the epslatex terminal.
painfulenglish
  • 161
  • 1
  • 7
2
votes
2 answers

Recommended workflow for generating plots for latex using gnuplot?

I have plots I want to generate and include in latex. I'm using the dvi -> pdf typesetting path. Gnuplot provides output "terminals" epslatex, pslatex, pstex, pstricks, texdraw, etc... I presume one of these is better than using the svg…
Andrew Wagner
  • 22,677
  • 21
  • 86
  • 100
2
votes
1 answer

hide C++ Gnuplot pipe console output

In C++I'm currently using this bit of code to plot some data using gnuplot. Gnuplot's fit command, however, produces a lot of unwanted output on the command line console (which I use for outputting some other stuff too, throughout the rest of my…
romeovs
  • 5,785
  • 9
  • 43
  • 74
1 2 3
99
100