1,065 questions
3
votes
2
answers
2k
views
gnuplot: load datafile 1:1 into datablock
How can I read a datafile as-is (or 1:1) into a datablock?
And how could I do this platform independently?
My attempt so far:
### load datafile "as is" into datablock for different platforms
FILE = '...
230
votes
11
answers
264k
views
Histogram with custom bin sizes 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 ...
168
votes
10
answers
162k
views
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 ...
75
votes
1
answer
231k
views
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
...
14
votes
4
answers
4k
views
Get ratio from 2 files in gnuplot
I have 2 dat files:
a.dat
#Xs
100 25
200 56
300 75
400 67
b.dat
#Xs
100 65
200 89
300 102
400 167
I want to draw a graph in the gnuplot where the yy values are a ratio between the ...
5
votes
4
answers
32k
views
gnuplot: apply colornames from datafile
How can I take colornames from a datafile?
I didn't expect this to be so difficult, but apparently it is.
Why do version 1 and version 2 give wrong colors? Is there a simpler way to achieve correct ...
17
votes
3
answers
40k
views
Add a single point at an existing plot
I am using the following script to fit a function on a plot. In the output plot I would like to add a single value with etiquette on the fitting curve lets say the point f(3.25). I have read that for ...
98
votes
6
answers
157k
views
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 ...
33
votes
3
answers
45k
views
Line plot in GnuPlot where line color is a third column in my data file?
I have a datafile that looks like this:
1 1.0 0
2 1.5 0
3 0.0 1
4 1.2 2
5 1.0 1
6 1.1 1
where the first column is my X value, the second column is my Y value, and the third column is a color. I'd ...
1
vote
2
answers
5k
views
Hatch patterns in gnuplot
I am wondering if gnuplot offers more hatched patterns than those 8 patterns which you see when typing "test" (e.g. in wxt terminal)
Maybe there are more than 8 fill patterns?
...apparently not, as ...
27
votes
2
answers
19k
views
Gnuplot: conditional plotting ($2 == 15 ? $2 : '1/0') with lines
My data looks like this:
10:15:8:6.06000000:
10:15:2:19.03400000:
10:20:8:63.50600000:
10:20:2:24.71800000:
10:25:8:33.26200000:
10:30:8:508.23400000:
20:15:8:60.06300000:
20:15:2:278.63100000:
20:20:...
19
votes
3
answers
17k
views
Removing blank gap in gnuplot multiplot
I am using multiplot in gnuplot to insert four graphs in the single figure. My code looks like this:
set term postscript eps enhanced color
set xlabel 'i'
set ylabel 'j'
set xtics 20
set ytics 20
set ...
18
votes
5
answers
112k
views
Making C code plot a graph automatically [closed]
I have written a program which writes a list of data to a '.dat' file with the intention of then plotting it separately using gnuplot. Is there a way of making my code plot it automatically? My ...
0
votes
1
answer
687
views
How to resample or interpolate data with gnuplot?
In some cases you might need to resample your data. How can this be done platform-independently with gnuplot? Below is one attempt.
The dataset $Dummy contains the interpolated values, however, with a ...
115
votes
5
answers
168k
views
How do you plot bar charts in gnuplot?
How do you plot bar charts in gnuplot with text labels?