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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
28 views

How to print parameters from a "do for" cycle with Gnuplot?

I've found here a quite helpful code for looping a fit through multiple data sets with the y-values in separate columns in one file. Each parameter is printed on the graph. Now, I was wondering how to ...
Konstantin Weigmann's user avatar
1 vote
1 answer
33 views

gnuplot: How to determine version of pdf output

I export gnuplot as PDF as follows: gnuplot -e "set terminal cairolatex pdf ;set output 'file.tex';load 'file.gp'" Works fine but creates PDF version 1.7. All other material works with 1.5, ...
user2609605's user avatar
1 vote
1 answer
22 views

Grayscale gnuplot with grouped boxplots

I need to create grouped boxplots, ideally using gnuplot exactly as shown in this answer. However, I need a grayscale plot. Moreover, the output has to be an encapsulated Postscript (EPS) file. When ...
THLO's user avatar
  • 145
0 votes
1 answer
42 views

Extraneous arguments to set style line

I run the following script (only the main part of the script is shown) # set-up nutc = 1.0 # torque # legend set key top right # 1st x axis set xlabel 't in d^2/{/Symbol n}' set format x "%.1f&...
user31899's user avatar
  • 125
1 vote
1 answer
65 views

I want to edit my script so it takes a single input file containing 31 sets of data and gives back 31 uniquely named output svg files

I would like to keep all the data organized in one single file to avoid having 31 input files, while generating 31 separate output svg files. Additionally I need the output file names to correspond to ...
Courtney Brea's user avatar
1 vote
1 answer
29 views

Remove padding between two filledcurves in gnuplot

I am trying to plot two filledcurves side by side. But they are not touching each other, instead there is a white gap in between. How to remove it? I tried to decrease the start and increase the end x ...
Sumit Gupta's user avatar
1 vote
2 answers
47 views

Plotting a 3D density map with colors interpolated between datapoints for large amount of data

I have some data to be plotted (~100k lines) in the form x,y,z,c, where x,y,z are coordinates, and c is a color. The coordinates range between [-0.5,0.5], and the color ranges between [-n,n], where n ...
Kregnach's user avatar
  • 107
2 votes
2 answers
117 views

Sorting data by angle and radial distance from origin in gnuplot

For context: I am plotting the k_x,k_y coordinates for the intersection of some energy bands in a brillouin zone with a certain energy value. However, the problem can be heavily simplified. My data ...
james's user avatar
  • 21
0 votes
1 answer
41 views

generate fence plot from series of (x, y, z) data points

I have some car price data in the form (year, mileage, price) as (x, y, z): 2018 53313 17590 2017 106000 10000 2017 69294 16495 2015 88000 13995 2017 38968 17732 ... I use a python script to sort by ...
bstpierre's user avatar
  • 30.3k
0 votes
0 answers
40 views

GNUplot nothing is plotting

I'm trying to represent the diffusion of temperature on an aluminum plate over time. I'm using GNUplot to show the result on the form of a heatmap. The problem is that, I would like for the graph to ...
Noah Dbc's user avatar
0 votes
1 answer
45 views

How can I plot multiple line graphs from multiple data files on the same graph?

I'm trying to plot multiple lines on a single graph, where the data for each line is in a separate data file. Data is a date/time and a real number. I can plot a single line/data file, but cannot get ...
Matt Gumbley's user avatar
0 votes
1 answer
55 views

gnuplot stacked histogram, variable number of columns

I have data like the following and I would like to draw it as a stacked histogram by row. I am uncertain how to deal with the variable number of columns. It does not matter how many columns there are. ...
Marki's user avatar
  • 662
0 votes
0 answers
13 views

gnuplot stacked histogram, first column is the key, second column the stack index [duplicate]

I'd like to obtain from data like this a 2023-10 1 a 2023-11 2 b 2019-10 2 b 2019-12 3 b 2020-06 4 a stacked histogram like this │ │ ┌─────┐ │ ...
Marki's user avatar
  • 662
0 votes
1 answer
63 views

Gnuplot: plot not updated

in a script bash, here is what I do: Every 3 minutes, I create binary data for one minute to get a waterfall. The following command creates two files: plot.met and plot.bin. rtl_power_fftw -f ...
gautudp's user avatar
  • 41
1 vote
1 answer
36 views

Extracting row as plot title in GNUPLOT

-Empty line here- LED:GREEN FREQUENCY:1 BRIGHTNESS:50 Colour State Time(s) GREEN 1 0.000000 GREEN 1 0.020000 GREEN 1 0.040000 GREEN 1 0.060000 GREEN 1 0.080000 GREEN 1 0....
ys086's user avatar
  • 13
1 vote
2 answers
56 views

Scatter plot with 3 categorical variables in gnuplot

With data like this Sensitivity,Recall,ID,Param1,Param2 0.89,0.551,run1,A1,alpha1 0.93,0.78,run1,A2,alpha2 0.54,0.76,run1,A2,alpha3 0.95,0.99,run2,A1,alpha1 0.354,0.445,run3,A1,alpha1 0.89,0.72,run4,...
alex_reader's user avatar
1 vote
1 answer
62 views

How to sort key by order of last y-values?

I already managed a graph in gnuplot. Now i want to optimize the order in the key. My solution would be to do it outside of gnuplot in form of preprocessing the data. But maybe someone of you knows an ...
grueni's user avatar
  • 11
2 votes
1 answer
29 views

Gnuplot lables in RGB colors read from data line

Related to Set variable textcolor and point color with labels style in gnuplot but not quite the same. I have a set of data in the file "test.dat": 643.8 0.09417 28.9 00 24 255 0 483....
Raphael J.F. Berger's user avatar
1 vote
2 answers
77 views

gnuplot: How to display transparent png with pixmap

I am trying to place images (png) on top of a map using the set pixmap command. It does work but the transparency of the png is not getting "displayed", and I get a white background instead....
Marionette_66's user avatar
0 votes
1 answer
45 views

Smoothing a line with Gnuplot not working as expected when using different colors depending on data value

This is the config I have and that works as intended to color the temperature curve blue if it is under 20C and red if it is 20C or above. set datafile separator "," set title "CO2, ...
Ocean's user avatar
  • 103
0 votes
1 answer
33 views

How to save a GNUPLOT to the correct size and resolution in mm?

I use GNUPLOT to generate a plot, the plot is like a grid with horizontal and vertical lines. the light blue lines are 1mm apart and dark blue are 5mm (a total of 250mm wide x 195mm height) So I want ...
Diego Fernando Pava's user avatar
0 votes
1 answer
23 views

gnuplot: customize labels on bar plots

The following script make a bar graphs indicating the y values directly on the colored bars. set term pngcairo size 1200,900 set title "$file_name" noenhanced font "Century,28" ...
James Starlight's user avatar
1 vote
1 answer
71 views

solve internal error: STRING operator applied to undefined or non-STRING variable

Newb here with Gnuplot. I tried just testing it with a simple plt script as per below but get the error when using it interactively (there is no output or error message when using it non-interactively)...
King Julian's user avatar
0 votes
2 answers
45 views

White background in gnuplot data points

Dears helpers, I want to plot an errorbars on the top of my bar chart. So I used "with errorbars" option and set pointsize to 0.1 so that they will be very small. However, when I set ...
Ngoc Anh's user avatar
-1 votes
1 answer
49 views

Gnuplot: line 0: no previous plot

I am trying to save the Gnuplot plot in PNG that I get with my SDR and a tool named rtl_power_fftw. This command displays my plot on the screen but I want to save it in PNG: rtl_power_fftw -f 900M:...
gautudp's user avatar
  • 41
0 votes
1 answer
55 views

How to do arithmetic operations on two columns from two different files with row offset in gnuplot?

I need to plot data from two CSV files. Column 1 from file1 starting from row 1 to 50 for x. For y I need to include arithmetic operation between file 1 and file 2. I want to use file 1 column 2 row 1-...
ASD's user avatar
  • 1
0 votes
2 answers
39 views

Gnuplot load command doesn't find file in same directory

Here is the simple test file I'm trying to load: file gnu2.b which contains: plot sin(x) Results of calling gnu2.b: in folder \progra~1\gnuplot\bin: gnuplot # brings up gnuplot prompt, then I ...
user1067305's user avatar
  • 3,243
0 votes
1 answer
75 views

How can I invoke gnuplot through a Windows Batch file

I want to invoke gnuplot with a Windows batch file (ultimately to be built by perl). I wrote a minimal batch file: cd \progra~1\gnuplot\bin gnuplot plot sin(x) It indeed brings up the gnuplot window, ...
user1067305's user avatar
  • 3,243
0 votes
0 answers
43 views

How to set arguments for gnuplot used via fio - fio_generate_plot

The documentation I can find for fio_generate_plots states: "The script takes the title of the plot as only argument. It does not offer any additional options." But I cannot figure out how ...
M_M's user avatar
  • 1
0 votes
1 answer
26 views

gnuplot terminal x11 scrolling

In gnuplot I am using terminal x11. When the size is bigger than the screen, is it possible to add horizontal and/or vertical scroll bars to view the graph? Is there any other terminal type that will ...
Girish S Joglekar's user avatar
1 vote
2 answers
113 views

Gnuplot: fitting and plotting peak with shoulder, but individual peaks need to be plotted too

I would like to plot the subpeaks of my fitted peak. I have a composite peak with a main peak and a shoulder. I can fit and plot it, but i need the individual subpeaks which build up the spectra. How ...
Hegmat55's user avatar
2 votes
1 answer
53 views

Gnuplot date limitation (2038?)

I'm finding a rare limitation in gnuplot, so it seems it can't work with dates after the year 2037. This is the code I'm using: myTimeFmt = '%d/%m/%Y' DateStart = '01/01/2038' DateEnd = '31/12/...
Unix's user avatar
  • 1,752
1 vote
1 answer
227 views

Multiplot of variable length data using gnuplot

Here I have two data files with model parameters and RMSEs computed for them. I would like to get those RMSEs plotted for each model separately with the model also displayed on it. Please help. Data ...
user86927's user avatar
1 vote
2 answers
66 views

gnuplot: Use an image instead of a point type

I have read this article (Gnuplot - plot image at point) showing how to use an image instead of a Point Type on a chart by utilizing a vector containing the names of the images together with in array ...
Marionette_66's user avatar
0 votes
2 answers
42 views

How do I add a fix number of ytics for auto scaled yrange ([*:*]) in gnuplot?

set ytics 5 # adds a tick mark at every 5 interval I want to add exactly five (or n) tics for a graph with auto scaling on. What are the ways to set exactly 5 (or n) ticks on a graph?
Tom's user avatar
  • 11
0 votes
2 answers
50 views

Within a plot command, how do I assign to (and subsequently use) an array variable the array value returned by a $f($1) call to a function block?

I am using gnuplot v6 rc1 as I am relying on a function block to implement a non-trivial algorithm. I have a function block definition function $f << _EOFD that returns a 7 element array based ...
najevi's user avatar
  • 3
0 votes
1 answer
51 views

Drawning circles in gnuplot

i’m trying to plot circles like the image bellow: enter image description here but with command “Plot with circles “ I can’t decrease the size of the circles. What can i do to plot circles like this? ...
Joao Paulo Menezes's user avatar
0 votes
1 answer
68 views

Gnuplot: How to disable "WARNING: Plotting with an 'unknown' terminal."?

In a Gnuplot file, I am using the following "subroutine" file to compute dimensions of some table: # Sets: # size_x ,min_x, max_x, # size_y, min_y, max_y. # Dummy plot to get statistical ...
emacs drives me nuts's user avatar
0 votes
0 answers
47 views

3D Gnuplot box plot with individual bars made up of different colors [closed]

I want to create a 3D Gnuplot box plot with different colors within an individual bar. (See example below). Is it possible in Gnuplot to create a box plot where I can specify multiple colors for ...
TrevCarey's user avatar
1 vote
1 answer
35 views

gnuplot set equal distance for ticks on both axes

In gnuplot, I want to plot with x-ticks as [0,1,2,...] and y-ticks as [0,2,4,...], but I also want the tick on both axes to have the same length to make the plot look nicer. I tried set size ratio 1 ...
kstn's user avatar
  • 557
1 vote
1 answer
39 views

Haskell gnuplot not working displaying plot

I've been using the Glasgow Haskell Compiler (GHC) to learn Haskell. I installed the gnuplot package using Cabal (I used the command cabal install --lib gnuplot). I can load the gnuplot module, ...
Leo Schmidt-Traub's user avatar
0 votes
1 answer
44 views

gnuplot: Why a Background Image Affects the Plotting of Data Points

The position of plotted data points is different if I use a background image or not, let me explain: If I generate a chart (One.png) using this script without a background image: $DATA<<EOD 1....
Marionette_66's user avatar
0 votes
3 answers
188 views

Is there a modulo operator for real variables in gnuplot?

So, gnuplot (I use 5.4 patchlevel 8) does not seem to support the modulo operator for real values: gnuplot> a = 5.0 % 2.0 non-integer operand for % Is there any workaround over this ...
coderodde's user avatar
  • 1,359
0 votes
1 answer
28 views

gnuplot: Defined radius in data is different from generated plot

This script used to give me the correct plot, now it does not... If I run this script: $DATA<<EOD 0.00,0.00,0.7000,90.0000,114.0000 0.00,0.00,1.0000,114.0000,162.0000 0.00,0.00,1.0000,162.0000,...
Marionette_66's user avatar
0 votes
1 answer
39 views

gnuplot for which x the y is maximum

In Gnuplot, I want to obtain from stats the value of x where the y attains maximum. The solution here uses a very clever trick. This solution only works without setting xrange. If I have a spike in ...
atapaka's user avatar
  • 1,258
1 vote
1 answer
41 views

How to plot a arrow on time using the x axis?

I am trying to get an arrow line on the plot using time ie 10:30:00. I had tried various formats of date & time but am getting the following error "naa_8c.plt" line 21: undefined ...
Peter's user avatar
  • 23
0 votes
1 answer
56 views

Getting plot area dimensions before plotting

I'm using gnuplot 5.2 qt for interactive plotting. I want to rotate some labels on my plot so that they are at a consistent angle relative to the coordinate grid. For example, if I have a label at (0,...
grahamstratton's user avatar
0 votes
1 answer
61 views

How to make graph in GNU plot with the given data without interpolation and showing missing data?

I have a .csv file as shown in the data_structure. First column is the density, second is altitude, third is latitude and last one is longitude. I want to make a graph like this visualise. But i am ...
Rabia Sönmez's user avatar
1 vote
2 answers
75 views

Plotting a 3D surface with Gnuplot (splot + hidden3d) destroys edge

I work in aerodynamic stability analysis and I want to create a general script to plot my eigenvectors. I am plotting a 3D surface and my data is an ordered multi-domain grid. I store my data in a dat ...
vpezlar's user avatar
  • 11
1 vote
2 answers
79 views

3D fitting with gnuplot

I have the following function s(x,y,z) = e0 + t*(cos(x)*cos(y) + cos(y)*cos(z) + cos(z)*cos(x)) which maps three data points x,y,z onto a single energy (this is the dispersion of an fcc crystal in ...
CW279's user avatar
  • 131

1
2 3 4 5
135