Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

How can I tell gnuplot to place a label outside the plotting area?

The gnuplot documentation says that "Labels outside the plotted boundaries are permitted but may interfere with axis labels or other text." Doing this seems like it would be straightforward: ...
Bryan Wright's user avatar
1 vote
2 answers
99 views

Display labels on both sides of Gnuplot graph

Gnuplot 5 on Raspberry Pi. How can I duplicate the y-axis text (-1, -0.8 etc) on both the left and the right sides of the graph? This is the code used to create it: set key fixed left top vertical ...
Jacques's user avatar
  • 33
0 votes
2 answers
42 views

retrieve ruler position for `mouseformat`

Is there a way to have access to the ruler postion? I'm trying to change the mouse format using set mouse mouseformat function: It works with something like: set mouse mouseformat function sprintf(&...
bibi's user avatar
  • 3,783
0 votes
0 answers
58 views

Don't display a Gnuplot graph in a window

Gnuplot 5.4 on a Raspberry Pi. When run from the command line in a graphical interface, the script below (which I've pruned a bit) creates a png. As it does so, a window appears then disappears. set ...
Jacques's user avatar
  • 33
2 votes
1 answer
61 views

gnuplot 6.0 animation not updating

I've never used stack overflow before, but I don't know who else i can go to for this, so apologies if I don't provide all relevant information. I am using "gnuplot 6.0 patch level 3 console ...
Cleveland4418's user avatar
2 votes
1 answer
49 views

gnuplot: how to color points based on column value when also using hypertext labels?

I have the following gnuplot data file: 1 4 foo 1 2 3 bar 2 5 8 baz 1 I have the following gnuplot command: set terminal qt label_text(str1) = sprintf("%s", ...
user2150989's user avatar
2 votes
3 answers
95 views

Drawing a vertical line in Gnuplot and adding a key/legend to it

reset set encoding utf8 set terminal pdfcairo size 20cm,20cm font "STIX Two Math, 22" enhanced set output "straight-lines.pdf" # set grid linetype 0 linewidth 1 dashtype 3 ...
chandra's user avatar
  • 353
0 votes
1 answer
50 views

Gnuplot while loop not looping when I change machines

I wrote a gnuplot script to use an infinite while loop (re)plotting data from a live data source. Something like this: while (1) { plot "< get_data | paste x_axis.dat -" pause 2 } ...
Cathy Garrett's user avatar
2 votes
1 answer
106 views

Gnuplot `title` using `set` and `show` versus as a follow on to `plot` on polar coordinates

I am using gnuplot 6.0 patchlevel 3 on Manjaro Linux, with the MWE below reset set encoding utf8 set terminal pdfcairo size 8in,8in font "STIX Two Math, 24" enhanced set output "mwe-SO....
chandra's user avatar
  • 353
2 votes
3 answers
156 views

How can I plot color cubes?

I have two cubes defined in the $d1 and $d2 data blocks. If I type these into gnuplot interactively, it works fine. But if I put the code into a.txt and then run load 'a.txt' in gnuplot, it fails on ...
Gyuszi Suto's user avatar
1 vote
1 answer
27 views

Second time axis count in weeks

I have a time series that count as dates (set timefmt "%d.%m.%Y"). I would like to have a second, x2 axies displaying the same data in weeks (set format x2 "%Ww"), so I wrote this ...
Sergei's user avatar
  • 157
1 vote
1 answer
72 views

I cannot plot multiple functions when using for loop

I want to plot multiple functions using for loop, but it always fails to load all of them and could not plot any functions. For example: set multiplot layout 2,2 set xrange [-pi:pi] set yrange [-1:1]...
ra1ned's user avatar
  • 349
1 vote
1 answer
51 views

Transparency and inverted colorbox produce inconsistent colors on gnuplot

I'm encountering a strange issue in gnuplot when combining transparency with an inverted colorbox. The colors shown in the colorbox do not match the colors actually used in the plot. Additionally, in ...
grsousajunior's user avatar
0 votes
2 answers
69 views

AUC by integration using Gnuplot results '0'

I am trying to find AUC after fitting a peak and integrating the fit. Following is the code (I am a newbie gnuplot user !^_^!). FILE = 'rdf_1.dat' f(x) = (a/2/d*exp(c**2/2./d**2 + (b - x)/d) * (erf((...
Bussller's user avatar
  • 2,085
2 votes
1 answer
68 views

How to set xtics with xticlabels

I would like to make a candlesticks chart with the day in the X axis for ever 5 days. But when I use "xticlabels" it just ignore the "set xtics 5" My code: set terminal pdf size 29....
aoliv's user avatar
  • 55
1 vote
1 answer
93 views

How to plot multiple colors according to column value and display a legend?

I have the following sample data in a file ("gnuplot_data"): 117 183 C3_V1 74 164 C3_V2 162 53 C3_V3 I want to make a scatter plot where the first 2 columns are X,Y coordinates and the ...
user2150989's user avatar
0 votes
2 answers
36 views

gnuplot: How can I include the year in file name for plotting

How can I include the year in a file name in a gnuplot script? If it was a bash script, I'd do this: yr=`date +'%Y'` plot "./data/$yr_data.dat" binary format="%int32" using (time0+$...
Roderick Stewart's user avatar
1 vote
2 answers
100 views

Gnuplot colorbox appears blank when inverted using certain terminals

I'm running into a strange issue when generating a plot using gnuplot (version 6.0 patchlevel 1, on Microsoft Windows version 10.0.19045.5737). To my plot I need the colorbox to appear inverted, i.e., ...
grsousajunior's user avatar
0 votes
1 answer
83 views

How can I adjust line 32 of the script for gnuplot to recognize the column headers are in string format?

gnuplot gives an error message for line 32 that states '"EMF-free-diagrams.gp" line 32: f_sprintf: attempt to print numeric value with string format. I am not sure how to adjust the code for ...
Courtney Brea's user avatar
0 votes
2 answers
74 views

Gnuplot script not adding green background

I have the Gnuplot script below. All looks good except that in the right pie-chart the area that is highlighted with black diagonal lines should have a green background. Update: Thank you. I have now ...
Toby53003's user avatar
0 votes
2 answers
149 views

Gnuplot installation on Linux for use in Latex [closed]

I want to ask: What is the best way to install gnulot on Linux Mint and to use it in Latex? For Latex I use MikTex and TeXstudio. Via apt there are 3 options available. I don't know, what the ...
philipp's user avatar
1 vote
1 answer
100 views

To plot boxes with different colors depending on a given condition

I'm trying to plot the absolute values of a datablock (called $dif) with solid boxes, whose colors depend on whether the y-coordinate is greater or lower than zero, namely plot $dif u (timecolumn(1,&...
ifffam's user avatar
  • 187
1 vote
1 answer
68 views

Overlaying two plots with overlapping ranges

In gnuplot, I would like to plot the exponential function on the range [-4:+4] and the natural logarithm function on the range [0.01:4] on the same plot. I.e., I would like to combine the results of ...
Rob Arthan's user avatar
0 votes
1 answer
42 views

Is there a way to obtain GPVAL_DATA_X_MIN, X_MAX, Y_MIN & Y_MAX from a plot, ignoring NaN values in gnuplot?

I've got a datafile with NaNs. The plot is ok, but when I try to get GPVAL_DATA_Y_MIN I obtain 0.0 while the minimum value is in fact 420.0; when I substitute the NaNs by random numbers, then I get ...
ifffam's user avatar
  • 187
0 votes
0 answers
38 views

How can I execute Gnuplot commands via Sciplot?

I'm working with Sciplot in C++ and want to do things like display extrema, which I hadn't found a way to do before. But Gnuplot is able to do such things. Can I run Gnuplot commands directly from ...
user29088184's user avatar
2 votes
1 answer
76 views

Remove time data gaps on the x-axis on gnuplot

I am currently measuring irradiance data at specific times for at least two days. The data I have is as follows: 12-03-2025 9:00 600 12-03-2025 9:01 601 12-03-2025 9:02 602 12-03-2025 9:02 603 ... 12-...
user29988642's user avatar
0 votes
1 answer
54 views

How to avoid unwanted hypertext in SVG when plotting with labels?

This question actually arose from this question. From help hyptertext: Some terminals (wxt, qt, svg, canvas, win) allow you to attach hypertext to specific points on the graph or elsewhere on the ...
theozh's user avatar
  • 27k
1 vote
1 answer
79 views

In gnuplot, is hypertext available also for bargraphs? I see a popup in term svg, but did not find a way to change it

I would like to create active content evaluations of KPIs. For that I would like to use the mouse over function as availabe e.g. for the point style (hypertext.dem). Is or will this be available for ...
Joe_Oldstyle's user avatar
1 vote
1 answer
89 views

Gnuplot Histogram and Linecolor Loop

In reference to Gnuplot 6.0. What if the data file is structured not in one line (typical for histograms) but as 3x3 array: 
1 0.12 172.7 2 0.11 183.8 3 0.75 55.4 Using loop: gnuplot -p << EOF ...
SofaScientist's user avatar
1 vote
1 answer
70 views

Overlapping Gnuplot ylabel letters in jpeg, gif, and png terminals

I am getting odd output when I make a graph and output it to a jpeg. The letters for the ylabel are all overlapping in a single space. A minimal example is set xlabel "THIS" set ylabel &...
Edward Brothers's user avatar
0 votes
0 answers
54 views

Gradient of a plot calculation in Gnuplot [duplicate]

I've got some data that would be useful to know at which points the gradient is increasing or decreasing. Data Would it be possible to change the color of the plot based on whether the gradient is ...
Matthew Hughes's user avatar
0 votes
1 answer
83 views

How to loop over multiple columns of a table to create contour plots for each column?

The following script is based on "How to create a 2D contour plot for the density of scattered data in gnuplot?". The problem I am encountering is that inside a loop the contouring part with ...
magfan's user avatar
  • 465
1 vote
2 answers
201 views

How to create a 2D contour plot for the density of scattered data in gnuplot?

The following script is based on an older topic (Gnuplot: Scatter plot and density). What I need is a contour plot of the scattered data. But there are some things that do not look as I expect. The ...
magfan's user avatar
  • 465
-1 votes
1 answer
49 views

How can i plot a nonuniform matrix where one axis is time?

I have a matrix of data (see this gist) which looks like this (with more rows and columns, and without the spaces for alignment): Timestamp, 45716, 45735, 45826 ...
Tom Anderson's user avatar
  • 47.4k
0 votes
1 answer
101 views

gnuplot, is there a way to switch the gui background color to black?

Is there a way to switch the colors of the gnuplot gui: background to black and text to grey or any other light color. I'm not talking about the console. I'm not talking about the plotting area. I use ...
fkk's user avatar
  • 5
2 votes
1 answer
59 views

Conditional tics format: one decimal if >1000 but no decimals if <=1000

When plotting tics, the usual way to get 1k rather than 1000 is set format y '%.s%c' Doing so, if I've got values greater than 1000 (but always lower than 2000), the format always renders 1k. If ...
ifffam's user avatar
  • 187
3 votes
1 answer
52 views

How to replace macros with functions in gnuplot?

How can the following, increasingly complicated macro stuff be replaced by a function? Calling macros within macros is quite error-prone sel_col = 'column(selected_column)' ref_col = 'column(...
magfan's user avatar
  • 465
1 vote
1 answer
41 views

It is not possible to extract specific columns of data in gnuplot based on a specific heading

In the following Gnuplot script, I want to extract values from a specific table. This works fine for columns that contain numbers but I cannot extract the path from the column "Measure:volume&...
magfan's user avatar
  • 465
1 vote
1 answer
43 views

How can gnuplot select certain named columns within a for loop?

The following script has some strange problems. When I load it after starting gnuplot, I get the following error: gnuplot> load "test_plot_data.gp" "test_plot_data.gp" ...
magfan's user avatar
  • 465
1 vote
1 answer
75 views

How to plot connected points from separated data blocks within a file?

The following data file can contain several blocks TP1, TP2, ..., TPn. How can I connect the points of each first, second, third, ... line with linespoint a diagram? Example first plotted line: TP1 -&...
magfan's user avatar
  • 465
0 votes
0 answers
108 views

Gnuplot in Latex does not pass

I am using Latex on Windows 10 with TexLive 2024. Latex documents are created with the TexWorks editor that comes with TexLive. I have installed Gnuplot and entered it in the path during installation. ...
jeroen2009's user avatar
1 vote
1 answer
37 views

gnuplot: time range is shown incorrectly

I have the following data: 2025-02-08 07:12 3.8 2025-02-08 12:15 4.7 2025-02-08 17:30 7 2025-02-08 19:40 6.3 and the following gnuplot snippet: reset set title "Glucose level&...
user11672821's user avatar
1 vote
1 answer
55 views

Position circles in polar grid in Gnuplot

I am trying to understand how Gnuplot places the circles when using a polar grid. In the below example I would like to change the number and positioning of the circular dotted lines. I am using ...
n0dus's user avatar
  • 389
1 vote
1 answer
46 views

gnuplot 6.02 labels as a function of value

A simple gnuplot to generate labels as function of a particular column is here; also, is a function that can input a value and return a string: set datafile separator "," set datafile ...
asylumax's user avatar
  • 830
-3 votes
1 answer
24 views

Need old gnuplot script interpretation

I found a github containing a Voice Activity Detection algorithm here. the implementation takes in a simple list of doubles (file = sound.txt), and outputs several text files, containing 2 columns of ...
Charles Martin's user avatar
0 votes
0 answers
58 views

How to pass a query (postgres) to gnuplot

I have a table in postgres (named tempdata with columns logtime and value) From the command line (linux) I can write echo "select logtime::timestamp , values from tempdata where logtime BETWEEN '...
G Hasse's user avatar
  • 13
0 votes
1 answer
34 views

gnuplot contour stops before reaching border

I have a file with a field (vr-cs) defined between -0 and 30 in x and -30 to 30 in y. You can download the file from here. I'm trying to plot a contour of vr-cs=0 between [0:8][0:3] set view map set ...
bedwere's user avatar
  • 41
1 vote
1 answer
99 views

Problems with pm3d and dgrid3d

I can't plot correctly the data of a file using pm3d and dgrid3d. The result obtained does not respect the desired grid and colours. To understand what was going wrong, I created the following simple ...
Juan Luis Rubio's user avatar
0 votes
0 answers
166 views

wxplot3d writes gnuplot commands which give error

This code was working (at least in 2022): pz(x,y,z) := z*exp(-sqrt(x^2 + y^2 + z^2)/2)$ wxplot3d(pz(0,y,z),[y,-10,10],[z,-10,10],[gnuplot_preamble,"set contour base;set cntrparam levels ...
Alby Stalks's user avatar
1 vote
2 answers
72 views

Is there a simpler way to create gnuplot filled curves for time data when data is only recorded on changes?

It is easy to create a filledcurve plot when time series data is at small regular intervals, and data changes infrequently. But what if data is recorded only on changes? In order to make a shaded plot ...
asylumax's user avatar
  • 830

1
2 3 4 5
139