Science topic

Gnuplot - Science topic

Explore the latest questions and answers in Gnuplot, and find Gnuplot experts.
Questions related to Gnuplot
  • asked a question related to Gnuplot
2 answers
I have zero experience using gnuplot and all I am trying to figure out is the meaning of the line I found on web, so that I can code it up using python.
gnuplot > p "kaccum.dat" i 30 u 1:2 w l, "kaccum.dat" i 30 u 1:8 w l
Relevant answer
Juan Antonio García-Armenteros Thank you so much for the insight. I really appreciate it.
  • asked a question related to Gnuplot
11 answers
Can anyone please help me out to know how to get get the bond force constant from the calculated potential energy surface using GNUPLOT or using some other method?
It would be highly appreciated.
Thank you
Relevant answer
  • asked a question related to Gnuplot
3 answers
Hi researchers,
I have used AMBER CPPTRAJ to generate dssp.gnu to view the 2D secondary structure of my protein throughout the molecular dynamic simulation using Gnuplot software. Unfortunately, the dssp.gnu file couldn't be able to open in Gnuplot software. Can anyone help me to fix this problem? I share the problem I faced when I tried to open the dssp.gnu file in the Gnuplot below.
kindly give me some suggestions to fix this problem. tq all!!
Relevant answer
Kennedy Asewie I have already tried this!! This isn't working for me. I face the same error after trying this out!!
  • asked a question related to Gnuplot
6 answers
Hello, I have the results for scattering rates, from epw software, but am wondering how I can plot the graphs of scattering rates as a function of energy as we have in this paper fig 1. Kindly share some information I will be very grateful. I am using gnuplot ==================================================================== # Inverse scattering time (ps) # ik ibnd E(ibnd) scattering rate(1/ps) 1 3 -0.29205368674922E+01 0.1404112602437623E+002 1 4 -0.29204177603800E+01 0.7328995342445310E+002 1 5 0.33364740729340E+01 0.1817640794169847E+003 2 3 -0.29205368674922E+01 0.1404112602437623E+002 2 4 -0.29204177603800E+01 0.7328995342445310E+002 2 5 0.33364740729340E+01 0.1817640794169847E+003 3 3 -0.29205368674922E+01 0.1404112602437623E+002 3 4 -0.29204177603800E+01 0.7328995342445310E+002 3 5 0.33364740729340E+01 0.1817640794169847E+003 4 3 -0.29205368674922E+01 0.1404112602437623E+002 4 4 -0.29204177603800E+01 0.7328995342445310E+002 4 5 0.33364740729340E+01 0.1817640794169847E+003 5 3 -0.29205368674922E+01 0.1404112602437623E+002 5 4 -0.29204177603800E+01 0.7328995342445310E+002 5 5 0.33364740729340E+01 0.1817640794169847E+003 6 3 -0.29205368674922E+01 0.1404112602437623E+002 6 4 -0.29204177603800E+01 0.7328995342445310E+002 6 5 0.33364740729340E+01 0.1817640794169847E+003 7 3 -0.29205368674922E+01 0.1404112602437623E+002 7 4 -0.29204177603800E+01 0.7328995342445310E+002 7 5 0.33364740729340E+01 0.1817640794169847E+003 8 3 -0.29205368674922E+01 0.1404112602437623E+002 8 4 -0.29204177603800E+01 0.7328995342445310E+002 8 5 0.33364740729340E+01 0.1817640794169847E+003 9 3 -0.29205368674922E+01 0.1404112602437623E+002 9 4 -0.29204177603800E+01 0.7328995342445310E+002 9 5 0.33364740729340E+01 0.1817640794169847E+003 10 3 -0.29205368674922E+01 0.1404112602437623E+002 10 4 -0.29204177603800E+01 0.7328995342445310E+002 . . . ====================================================================
Relevant answer
In our case, for scattering rates, we have a real part of the energy and an imaginary part of the energy, so we do the following:
We always plot real in the x-axis and imaginary part in the y-axis, Dear Sylvester Makumi
As in the paper you had pointed out, Imag part scattering cross-section ~ τ-1 in te figures "Fig. 1: Calculated scattering rates" of that paper.
Best Regards.
  • asked a question related to Gnuplot
5 answers
Dear highly esteemed scholars,
I have run projwfc.x and obtained obtained around six files for s, p, d orbitals. I am quite new to such calcuation and yet i am keenly interested to do it. How should i combine all these data and plot the graph for total DOS and PDOS?
I am working on Quantum Espresso installed on Ubuntu and using gnuplot for graph plotting.
Help me out, please.
Relevant answer
Hi, I think Bruno has provided sample python script you could use to solve your problem.
  • asked a question related to Gnuplot
4 answers
In my calculation, the Fermi level is at 2.34 eV in the band structure. Now I want to shift the Fermi level to zero in GNUPLOT. please tell me about this problem or write command to bring F.L to zero in gnuplot.
Relevant answer
You need just to refer all energy levels to the Fermi level by simply subtracting Ef the fermi energy level value from all other energy levels.
This is in agreement with the above answers.
Best wishes
  • asked a question related to Gnuplot
1 answer
I like to plot the partial density of states of Ta3N5. Contribution of different orbitals like s, p and d in band structure. Can anybody explain it to me.
Relevant answer
Use Gnuplot
gnuplot is a command-line program that can generate two- and three-dimensional plots of functions, data, and data fits. The program runs on all major computers and operating systems
  • asked a question related to Gnuplot
4 answers
I plotted the graphene structure with ChemDraw Professional 15.1, and show with the Chem 3D Hotlink, and found that the 3D image was always not in one plane. Do some colleagues know the trick to deal with the problem?
With best regards
Relevant answer
Is the Chem 3D software free to download? I am looking for such a software as well. Thank you.
  • asked a question related to Gnuplot
5 answers
I wanted to get a scatter plot but the constraint is to plot these points over an image with same dimension as the range of points. Is is possible? If yes which library is good to start with? I tried using gnuplot but it is causing problems. For now I have a code which was stated here but didn't work. I tried using a bitmap image with the points to be plotted in data1.dat file and used the gnuplot script which is stated in the link
set terminal pngcairo transparent
set output 'Figure1.bmp'
plot "Co_ordinates0.dat"
set output
Relevant answer
To do this using matplotlib in python:
import matplotlib.pyplot as plt
import cv2
fig, ax = plt.subplots()
img = cv2.imread(<filepath>)
ax.scatter(e.xdata, e.ydata, label=str(counter))
This is working for me. The patches library also works for the purpose of more extensive visualizations.
  • asked a question related to Gnuplot
3 answers
I want to make a curve spline with points like excel but gnuplot 5.2 doesn't have the option "smooth path". I can see that the version 5.4 or 5.5 have the option "smooth path" but I could not install that versions. Someone to help me?
Relevant answer
Under Windows, you should not build it from the source files, and just download the ready-to-install package (a normal Windows installation), but this is not true for the very last version (5.4.0). If you need features from the 5.4 version, and don't want to build the executable file from the sources, then you should wait for the executable file to be downloadable (they say this will happen, sooner or later).
  • asked a question related to Gnuplot
5 answers
I have x and y coordinate values and the nitrate concentration values that I need to categorise as "very low" "low" "moderate" "high" "very high" and generate a numerical zvalues. Please I will also appreciate a step by step guide on how to proceed from my raw nitrate values.
Relevant answer
@Isimemen Osemwegie
Very well,
These steps are integrated.
Overall ranking and prioritization in supervision and fuzzy in MATLAB!
I also suggest you review my articles on fuzzy decision making if you wish.
Good luck
  • asked a question related to Gnuplot
3 answers
Hello everybody,
I want to plot numerical results with the analytical solution for a‌n arbitrary solver. I think the software Gnuplot can be used with a script whose name is
What is the structure of this script and how can I write it for the OpenFOAM results?
Relevant answer
This is an alternative way to visualize your results. You can extract your results into a .csv file using ParaView. Just create a spreadsheet view of your selected data source and save it with the .csv extension, then you can plot both the analytical and simulation results using the software of your choice.
  • asked a question related to Gnuplot
1 answer
Hi, please anyone knows a method to plot the density of states (PDOS) vs E-Ef (Ef= E Fermi) using GNUPLOT, as it looks like with gnuplot I only get PDOS vs E?
Relevant answer
Yes, you have to shift your x-axis by Ef value. In the gnuplot code you need to add
plot "filename" u ($1 - Ef):2 w l
Then it will take care of it.
Hope it helps.
  • asked a question related to Gnuplot
1 answer
Dear All,
I calculate band structure and hopping matrix of monolayer Graphene by using wannier90-2.0.1. There are two atoms in one unit cell, the following is input information :
ECUT = 500
EDIFF = 1e-5
IALGO = 38
PREC = Accurate
SIGMA = 0.05
ALGO = None
NELM = 0
# for GW uncomment
#exclude_bands 16-64
Begin Projections
End Projections
# parameters for disentanglement
dis_conv_tol = 1.0d-10
dis_conv_window = 20
# parameters for wannierisation
num_iter = 2000
conv_tol = 1.0d-10
conv_window = 20
# output hamiltonian matrix
#write_hr = true
hr_plot = true
# Bandstructure plot
#restart = plot
bands_plot = true
begin kpoint_path
G 0.0000000 0.0000000 0.0000000 K 0.3333333 0.6666667 0.0000000
K 0.3333333 0.6666667 0.0000000 M 0.5000000 0.5000000 0.5000000
M 0.5000000 0.5000000 0.5000000 G 0.0000000 0.0000000 0.0000000
end kpoint_path
bands_num_points 40
bands_plot_format gnuplot xmgrace
begin unit_cell_cart
2.4667090 0.0000000 0.0000000
1.2333545 2.1362327 0.0000000
0.0000000 0.0000000 15.1023000
end unit_cell_cart
begin atoms_cart
C 0.6166773 0.3560388 0.0000000
C 3.0833862 1.7801939 0.0000000
end atoms_cart
mp_grid = 6 6 1
begin kpoints
0.000000000000 0.000000000000 0.000000000000
0.166666666667 0.000000000000 0.000000000000
0.333333333333 0.000000000000 0.000000000000
0.500000000000 0.000000000000 0.000000000000
0.333333333333 0.166666666667 0.000000000000
0.500000000000 0.166666666667 0.000000000000
-0.333333333333 0.333333333333 0.000000000000
-0.166666666667 -0.000000000000 0.000000000000
-0.000000000000 -0.166666666667 0.000000000000
0.000000000000 0.166666666667 0.000000000000
-0.166666666667 -0.166666666667 0.000000000000
0.166666666667 0.166666666667 0.000000000000
-0.333333333333 0.000000000000 0.000000000000
0.000000000000 -0.333333333333 0.000000000000
0.000000000000 0.333333333333 0.000000000000
-0.333333333333 -0.333333333333 0.000000000000
0.333333333333 0.333333333333 0.000000000000
-0.000000000000 -0.500000000000 0.000000000000
-0.500000000000 -0.500000000000 0.000000000000
-0.333333333333 -0.166666666667 0.000000000000
-0.166666666667 -0.333333333333 0.000000000000
0.166666666667 0.333333333333 0.000000000000
0.166666666667 -0.166666666667 0.000000000000
-0.166666666667 0.166666666667 0.000000000000
-0.500000000000 -0.166666666667 0.000000000000
-0.166666666667 -0.500000000000 0.000000000000
0.166666666667 0.500000000000 0.000000000000
0.166666666667 -0.333333333333 0.000000000000
-0.166666666667 0.333333333333 0.000000000000
-0.333333333333 -0.500000000000 0.000000000000
0.333333333333 0.500000000000 0.000000000000
0.333333333333 -0.166666666667 0.000000000000
-0.333333333333 0.166666666667 0.000000000000
0.500000000000 0.333333333333 0.000000000000
-0.500000000000 -0.333333333333 0.000000000000
0.333333333333 -0.333333333333 0.000000000000
end kpoints
part of output wannier_hr.dat :
0 0 0 1 1 #5.975871 -0.000000
0 0 0 2 1 -1.089392 0.557442
0 0 0 3 1 -0.139528 -0.085332
0 0 0 4 1 0.155557 -0.074815
0 0 0 5 1 0.048334 0.012936
0 0 0 6 1 -0.040701 0.012192
0 0 0 7 1 -0.000254 -0.005978
0 0 0 8 1 0.140810 -0.003572
0 0 0 1 2 -1.089392 -0.557442
0 0 0 2 2 #-3.873225 -0.000000
0 0 0 3 2 3.091729 1.850427
0 0 0 4 2 2.671730 0.889670
0 0 0 5 2 -0.057204 -0.033336
0 0 0 6 2 0.183550 -0.012852
0 0 0 7 2 0.063698 -0.025852
0 0 0 8 2 0.199665 0.137492
0 0 0 1 3 -0.139528 0.085332
0 0 0 2 3 3.091729 -1.850427
0 0 0 3 3 # -9.031542 0.000000
0 0 0 4 3 -2.032979 0.353178
0 0 0 5 3 -0.003251 0.006119
0 0 0 6 3 0.238048 -0.035893
0 0 0 7 3 -0.085293 0.054229
0 0 0 8 3 0.377565 0.008021
0 0 0 1 4 0.155557 0.074815
0 0 0 2 4 2.671730 -0.889670
0 0 0 3 4 -2.032979 -0.353178
0 0 0 4 4 #-10.109918 -0.000000
0 0 0 5 4 -0.036041 0.016305
0 0 0 6 4 -0.777184 0.094481
0 0 0 7 4 0.054059 -0.024728
0 0 0 8 4 -1.182728 -0.226013
0 0 0 1 5 0.048334 -0.012936
0 0 0 2 5 -0.057204 0.033336
0 0 0 3 5 -0.003251 -0.006119
0 0 0 4 5 -0.036041 -0.016305
0 0 0 5 5 #5.601534 -0.000000
0 0 0 6 5 0.229079 -0.103372
0 0 0 7 5 -0.141783 0.103966
0 0 0 8 5 0.697744 -0.056069
0 0 0 1 6 -0.040701 -0.012192
0 0 0 2 6 0.183550 0.012852
0 0 0 3 6 0.238048 0.035893
0 0 0 4 6 -0.777184 -0.094481
0 0 0 5 6 0.229079 0.103372
0 0 0 6 6 -#0.667422 -0.000000
0 0 0 7 6 -0.247113 0.097277
0 0 0 8 6 3.423367 1.060382
0 0 0 1 7 -0.000254 0.005978
0 0 0 2 7 0.063698 0.025852
0 0 0 3 7 -0.085293 -0.054229
0 0 0 4 7 0.054059 0.024728
0 0 0 5 7 -0.141783 -0.103966
0 0 0 6 7 -0.247113 -0.097277
0 0 0 7 7 #-0.698032 -0.000000
0 0 0 8 7 0.083201 0.011267
0 0 0 1 8 0.140810 0.003572
0 0 0 2 8 0.199665 -0.137492
0 0 0 3 8 0.377565 -0.008021
0 0 0 4 8 -1.182728 0.226013
0 0 0 5 8 0.697744 0.056069
0 0 0 6 8 3.423367 -1.060382
0 0 0 7 8 0.083201 -0.011267
0 0 0 8 8 #-9.878974 0.000000
Some numbers should be equal : h11=h55, h22=h66, h33=h77, h44=h88, but why my results not show? any wrong input parameters? (Mark # in the *_hr.dat)
Relevant answer
You can send the question to the Wannier90 forum at
It is easier to get help there from the wannier90 experts.
  • asked a question related to Gnuplot
18 answers
How does plot good looking publishable bandstructure from VASP calculation.
I have tried p4vasp but we can not modify graph in p4vasp. Any other suitable method for plotting bandstructure from VASP calculation.
Relevant answer
Mukesh Sharma: the coordinate of high symmetric points in the Brillouin zone can be found in The Bilbao database as long as you know the space group of the crystal:
- The second question: providing the coordinates of them in hand, how to decide the path, you can use the SeeK-path tool which recommends a good crystallographic path:
- you can actually plot a publication-quality band structure with ease using my package:
  • asked a question related to Gnuplot
1 answer
I am using SIMPSON to simulate DQ signals generated by the pulse sequence SPC5. The input file of my simulation is modified from the input file of Post-C7, which is written in the original SIMPSON paper (Bak, M.; Rasmussen, J. T.; Nielsen, N. C. Journal of Magnetic Resonance 2011, 213 (2), 366–400.) My input file is as followed:
#Cb, Ca, C' in order
#parameters from Journal of Magnetic Resonance 164 (2003) 270–285 (for alanine)
spinsys {
channels 13C
nuclei 13C 13C 13C
dipole 1 2 -2147 0 69 111
dipole 2 3 -2117 0 0 0
dipole 1 3 -475 0 34 111
par {
spin_rate 25000
sw spin_rate/2.0
np 64
crystal_file rep100
gamma_angles 40
start_operator Inz
detect_operator -Inz
verbose 1101
proc pulseq {} {
global par
maxdt 1
#matrix set detect totalcoherence {2}
set rf [expr 5.0*$par(spin_rate)]
set t90 [expr 0.25e6/$rf]
set t270 [expr 0.75e6/$rf]
set t360 [expr 1e6/$rf]
for {set i 0} {$i < 5} {incr i} {
set ph [expr $i*360.0/5.0]
pulse $t90 $rf $ph
pulse $t360 $rf [expr $ph+180]
pulse $t270 $rf $ph
store 1
acq $par(np) 1
proc main {} {
global par
fsave [fsimpson] $par(name).fid
I used "-Inz" first for detect_operator as in the original paper and got a build-up curve with intensity ~0.75 (as attached). But I want to obtain DQ signals so I change the detect_operator to be "–(I1p*I2p+I1m*I2m)", which stands for DQx. However I got a build-up curve with intensity ~0.0007, too low for the DQ conversion efficiency (as attached). I also tried "matrix set detect totalcoherence {2}" in the proc pulseq part to obtain DQ signals but had the intensity with similar intensity.
Does anyone know what’s wrong with my coding? Thanks in advance.
Relevant answer
Did you get a chance to solve your problem ? I am struggling with the simulation of DQ-DRAWS experimental results myself ... I would be thrilled if you could give me some insight if you managed to obtain good fits.
  • asked a question related to Gnuplot
10 answers
I have run boltztrap calculations. And i have case.trace file with 10 columns in total. Now I need to plot electrical, thermal conductivities Vs Temprature.
I use to plot with Gnuplot, but when i use :
-> plot 'case.trace' u 2:8 w l
i got a lot of curves in the figure...
here attached my case.trace file.
Could you please tell me the procedure of plotting them with gnuplot?
Relevant answer
Yes, you just change the fixed quantity in '$1' or $2'. For an example: for a fixed temperature if you want to calculate the variation of conductivity as a function of chemical potential then type in gnuplot terminal..
plot "<awk '$2==x' filename.trace" u 1:6 w l
where x is the fixed temperature in kelvin.
  • asked a question related to Gnuplot
4 answers
I am going to start using GNUPlot for my future papers, because it is perfectly integrated with LaTeX and Tcl. Recently I used Matplotlib (Python), R, Plotchart (Tcl), and D3 (JS). I don't like to proceed with them because PDF, SVG, or PS are required as intermediate files and it's not good for the version control. I'd like to ask people with GNUPlot/LaTeX hands-on experience what are the disadvantages/bottle-necks of GNUPlot??? Please share your thoughts on it
Relevant answer
I don't really see why intermediate files like PDF, SVG, or PS are a problem. Usually the publisher wants to have all of your images in one of these formats anyway, even when you submit your manuscript as LaTeX/pdf. And for version control you can use Git for example.
That said, for me the biggest bottleneck of GNUPlot is finding the right "terminal" that has all the functionality/appearance that I want. Furthermore, in my opinion the documentation of matplotlib is much easier to understand than GNUPlot's documentation.
  • asked a question related to Gnuplot
4 answers
I am trying to plot T against S from the attached file (BoltzTraP_Tutorial.tace) obtained using the BoltzTraP code but the graph i get looks funny. I used the code :
plot 'BoltzTraP_Tutorial.trace' using 2:5 with linespoints
Relevant answer
you can find below two modules can help you to plot your data: by using python and matplotlib
Hop that helps you
  • asked a question related to Gnuplot
3 answers
Good day everyone,
I need to plot few graphs using gnuplot. So while installing gnuplot for windows, I am encountering error 267. This error means the file is not in directory. Is there anyone experienced installing gnuplot in windows without any error? Can you guide me? I'm looking forward for a advice from you all. Thank you so much in advance.
Relevant answer
Rinaa Ramesh You can use the package manager Chocolatey. It will download and install gnuplot as well as any dependencies. link:
  • asked a question related to Gnuplot
3 answers
I want to smooth my Density of state curve and for that I want to implement method of running average of 2 or 3 points using gnuplot. I tried with all smoothing operations (smooth unique, csplines etc.) but the curve doesn't look good or if it is smooth it loses it's property.
can anyone please provide a script? suppose I want to use this command plot 'TDOS.dat' u 1:avg3($2) w l ...... the second column should follow the running average technique.Please help me.
Relevant answer
You can smooth the DOS from the source files. I mean, usually you can select how the smearing would be from the program. For example VASP can use mainly two types of smearing: Gaussian smearing and Fermi smearing (among others). So you can have the smooth you want without loosing the properties, in the raw data.
  • asked a question related to Gnuplot
16 answers
I have four columns data for a single two dimensional (2D) contour plot.
Relevant answer
Hi Kartick da,
Here I am attaching a gnuplot of 1D. I want to mark on the line may be some squre or circle or anything. Can you please help me in this regard?
With Regards,
  • asked a question related to Gnuplot
13 answers
I produce data in Linux and use Grace in order to visualize data. However, Grace just works in 2D. Now, I have problems with Grace. I am looking for better tool.
I heard Gnuplot is a perfect tool in Linux but I have problem in its running.
Relevant answer
Dear Najmeh,
If you're still searching for the tool, I'd suggest BioVinci. You can find both 2D/3D graphs and statistical analyses in there. I've tried its 3D scatter plot, violin plot, and heatmap - all are interactive and easy to customize. Its PCA is pretty cool, too.
  • asked a question related to Gnuplot
4 answers
can anyone please tell me how to draw contour plot of potential energy surface of nuclei using beta and gamma using gnuplot.
Relevant answer
I suggest that you try to use origin lab
  • asked a question related to Gnuplot
2 answers
The vasp output, DOSCAR file contains information about dos and there are three columns for total energy, density of state and Integrated density of state respectively.This DOSCAR file with LORBIT= 0.Actually I want to know the whole process step by step how the average TDOS plot can be found by using GNUPLOT software ? Thank you for your co-operations.
Relevant answer
Assume that you have a NEDOS=301 (default number)
using gnuplot you can plot the Total DOS like that:
gnuplot >> plot "<awk 'NR==7,NR==(7+301)' DOSCAR" u 1:2 w l
hope that helps you
  • asked a question related to Gnuplot
4 answers
I have a big dataset with mat format (used for Matlab). It is a giant matrix. Its size is about 280 MB. I am trying to input it into R using the function 'readMat' in package 'R.matlab'. However, it took soooo long time (about 20 minutes) and then it threw out an error 'cannot allocate vector of size 10.7Gb'. Though it can be easily inputed in Matlab (about 1 minute).
Does anyone know how to input a large mat dataset into R quickly? And why the memory stuff is OK in Matlab but not in R?
Relevant answer
Thanks, Saul! That package 'data.table' works very well. It cannot read mat directly and I have to convert mat into csv firstly, but it reads csv very quickly. It did solve my problem!
Thanks again,
  • asked a question related to Gnuplot
8 answers
Hello everyone,
I have a sequence of files which named like plot_1.txt, plot_2.txt… plot_i.txt… plot_40.txt. The first column of these files is the time. The second column is the value of my interest. All these files have the same first column but different second column. The contents of these file is like:
Time     Numbers
1         33
2         127
3         227
4         283
Now I want to use Gnuplot to get a graph of Time (first column) vs. mean value of Numbers (second column) and with errorbars on the graph.
Do I have to process these files manually to get the average value together with the Second Deviation of the second column, and then use Gnuplot to plot the file?
If Gnuplot cannot give the mean value of the second column and second deviation directly, and I need to obtain these two values myself. Because there are too many files for manually calculation, could you please give me some advice on how to do this fast and accurate?
Any help would be much appreciated!
Relevant answer
Dear Liu,
I don't know it is useful for you right now or not.
For the beginning, there is a command in Gnuplot that is called "stat". For example, you have a file that its name is "myfile1.txt"
In terminal go to that directory and open up Gnuplot and type: 
stat "myfile1.txt" 
then it shows a lot of information about that file like mean value of each column, standard deviation and a lot of more things.
For inserting error bars, the usual way is to calculate this one:
STD-D/sqrt(number of iteration) or STD-D/sqrt(number of iteration -1)
then you write it in the third column. Personally, I use a simple python code or just a bash script for the value of error bars.
For plotting use sth like this:
plot 'myfile1.txt' u 1:2:3 w errorbars    (It has a lot of options)
The main concern is finding an automatic way to do all of this stuff.
I strongly recommend that copy all of your files to a directory then using awk command for deleting unnecessary columns, then doing all this stuff in just a bash script with a simple loop. It's not hard at all. (Of course, you can do all of these in Gnuplot somehow)
At the end, I found the best solution couple of months ago which is using mathplotlib from a bigger module is called pyplot in python that is so great.
I hope this is useful for you.
  • asked a question related to Gnuplot
23 answers
The ONE is a simulator designed for the DTN routing protocols. I have experience in NS2.
Now want to understand how ONE works? 
For example for NS2 simulation, first of all one has to write a TCL script which is run via terminal. Output of TCL is a trace file which is further processed through AWK script to get the network performance i.e PDR, delay etc. Output of AWK can be plotted using GNUPLOT.
If I replace NS2 to ONE simulator then how to get the network performance?
Relevant answer
//** Apologies, if you have received multiple copies. Please forward the email to interested colleagues and research scholars**//
Respected Sir/Madam,
Book Chapter proposals are invited for the Edited book titled "Opportunistic Networks: Mobility Models, Protocols, Security & Privacy" in the following topics:
1. Foundations of Opportunistic Network:
v  Migration from MANET to Opportunistic Networks, Basic Concepts of Opportunistic Networks (OppNets)
v  Need of Opportunistic Networks, Types of Opportunistic Networks
v  Sensor Networks: MULE, BIONETS, ZebraNet, SWIM 
v  Pocket Switched Networks: MANET, MSN, VANET, DTN
v  Amorphous Opportunistic Networks: Semantic Opportunistic Networks, Freenet
v  Requirement for OppNets
2. Delay Tolerant Networks (DTNs):
v  Basic Concept, DTN Architecture: Virtual Message Switching Using Store-and-Forward Operation, Nodes and Endpoints, Endpoint Identifiers (EIDs) and Registrations, Priority Classes, Congestion and Flow Control at Bundle Layer
v  Buffer Management, Challenges for Applications over DTN
v  Security for DTN Applications
v  Case Studies: Message-Based Applications—E-mail/SMS, Stream-Based Applications—XMPP, Web, Content Search, Underground Mines, Floating Content
3. Taxonomy of Mobility Models:
v  Random Waypoint Movement Model (RWPM)
v  Map-Based Movement Models: Well Known Text (WKT) format: Map Route Movement and Shortest Path Map Based Movement (SPMBM)
v  Route Based Movement Model (RBM), Working Day Movement Model (WDMM)
v  Transportation Analysis and Simulation Systems (TRANSIMS)
v  Social Network Based Mobility Models: Social Network Models, Community Based Mobility Model
v  Pursue Model, Manhattan Mobility Model, Rush Hour (Human) Traffic Model, Random Direction Model
v  Brownian model, Obstacle Mobility model, Trace-Based Mobility Models, Smooth Random Mobility Model
v  Evaluation of Mobility Models
4. Taxonomy of Routing Protocols:
v  Infrastructure Opportunistic Networks
v  Dissemination based: Epidemic Routing: PROPHET, MaxProp, MV Routing, Spray &Wait, SMART, MARS, RAPID, EBR, SCAR, Direct Delivery
v  Network Coding Based Routing
v  Context Base Routing: Context –Aware Routing (CAR) Protocol, PROPICMAN, Moby-Space Routing Protocol, History-Based Opportunistic Routing Protocol (Hi-BOP)
v  Without Infrastructure Opportunistic Networks
v  Evaluation of Routing Protocols
5. Route Optimization Techniques for fast Data Delivery:
v  Basic Concepts, Route Optimization using Membrane Computing, Route Optimization using Game Theory, Route Optimization using Ant Colony Optimization (ACO), Route Optimization using PlayNCool
v  Performance Evaluation of Route Optimization Techniques
6. Improve Quality of Service of Opportunistic Network:
v  Heterogeneous Connections: Connection Process, Heterogeneous Connections, Network Capacity
v  Network Selection: Network Discovery, Network Selection Algorithms for Information Dissemination
v  Message Forwarding: Single-Copy Forwarding, Multi-Copy Forwarding
v  Congestion Control, Mobile Agents   
7. Vehicular Ad hoc Networks (VANETs):
v  Basic Concepts, VANET Architecture
v  VANET Routing Approaches: Geocast/Broadcast, Unicast, Multicast
v  Geocast/Broadcast:Spatially aware packet routing algorithm, SADV, Interference Aware Routing, FROV,Multihop broadcast protocol, Proposed Algorithms: V-TRADE, UMB, AMB, MHVB, MDDV
v  Unicast:  Greedy: GSR, GPCR, GyTAR, Connectivity Aware Routing, Opportunistic: OPERA, Topology-assist geo-opportunistic routingandMaxProp, Trajectory: SiFT, GeOps, TBD, TTBR
v  Multicast: Topology-Based Approaches: ODMRP, MAODV, GHM, Location-Based Approaches: PBM, SPBM, LBM, RBM, IVG
v  Simulation Methods: Traffic Simulators,Network Simulators
v  Applications
8. Energy Management:
v  Localized Algorithms save Energy, Minimum-Energy Broadcasting and Multicasting, Power-Aware Routing
v  Power-Efficient Neighbour Communication and Discovery for Asymmetric and Symmetric Links
v  Challenges for Energy Management
9. Network Coding Schemes:
v  Basic Concepts
v  CodeOR, SlideOR, AONC, BEND, COPE
v   Performance Evaluation of Network Coding Schemes
10. Taxonomy of Security Attacks
v   Basic Concepts of Attacks, Types of Attacks: Jamming: DoS, DDoS, RDDoS Attack, Black Hole Attack, Cooperative Black Hole Attack, Wormhole Attack, Byzantine Attack, Sybil Attack, Sleep Deprivation,  Rushing Attack, Colluding misrerlay attack, Link Spoofing Attack, Selective Forwarding Attack (Gray Hole attack), Snare Attack, Blackmail Attack, Cooperative Blackmail Attack, Cloning Attack, Sinkhole Attack, Desynchronization attack, Overwhelm attack, Jellyfish Attack
v  Comparison of Attacks
11. Security, Privacy & Trust, Anonymity:
v  Security issues, Authentication and Authorization, Privacy and Trust management techniques, Identity management,  Location-based security services
v  Mix Networks, Intrusion Detection and Prevention Techniques
12. Future Networks Inspired by Opportunistic Networks:
v  Introduction
v  BIOlogically-inspired autonomic NETworks and Services (BIONETS),Mobile Ubiquitous LAN Extensions (MLUEs), Shared Wireless Infostation Model (SWIM), Vehicular Delay Tolerant Networks (VDTNs), ZebraNet, Freenet,
v  Evaluation of OppNets
13. Network Emulation Testbed for Opportunistic Networks:
v  Design Challenges: Mobility, Disruptions, Wireless Communication, Scalability,
v  QOMB Testbed: StarBED, QOMET, Overall Architecture
v  DTN Implementations
14: Applications and Future Trends:
v  Introduction
v  Opportunistic Computing, Mobile Data Offloading, Research Trends on Recommender Systems
15: Hands-on “The ONE simulator” – Opportunistic Network Environment
Important Dates:
Last Date for Submission of Chapter Proposal (Minimum 4 Pages)                01 August 2017
Acceptance/Rejection of Book Chapter Proposal notification to Authors         20 August 2017
Full Chapter submission by Accepted Authors                                      10 December 2017
Submission of revised/Final Chapters to publisher                                 10 January 2017
NOTE: The book chapter proposal may kindly be sent by strictly following the attached format to the following Email Id:
Dr. Nur Izura Udzir
Universiti Putra Malaysia, Malaysia (,
Dr. Khaleel Ahmad
Maulana Azad National Urdu University, India (
Dr. G C Deka
Directorate General of Training, Ministry of Skill Development & Entrepreneurship, New Delhi-110001, India (
  • asked a question related to Gnuplot
2 answers
Hi everyone,
I have used QUANTUM ESPRESSO and wannier90 to calculate  the electronic band structure and density of states for a system of 5 carbon atoms that is published in this paper:
However, the band structure that I get is just flat. Can anyone help me with it? What can be reasons to cause the electronic bands to be flat? I am assuming that there might be something wrong with the parameters, but I am not sure. Below are my scf and win files in case you need to look at them. BTW, includes the relaxed positions and cell parameters. Any feedback and suggestions are greatly appreciated. Thanks in advance 
calculation = 'scf',
restart_mode= 'from_scratch',
verbosity = 'high'
pseudo_dir = '/share/apps/espresso/espresso-5.1/wannier90-1.2/pseudo',
outdir = './',
prefix = '5cc',
tstress = .f.,
tprnfor = .t.,
ibrav = 0,
cosbc = 0.,
cosac = 0.,
cosab = 0.,
nat = 5,
ntyp = 1,
ecutwfc = 30.,
ecutrho = 240.,
occupations = 'smearing',
smearing = 'cold',
degauss = 0.03,
nspin = 1,
mixing_beta = 0.4
electron_maxstep = 1000,
conv_thr = 1.D-10,
6.520 0.00 0.00
0.00 1.304 0.00
0.00 0.00 1.304
C 12.0107 C.pz-vbc.UPF
C -14.700 2.190 0.000
C -13.380 2.190 0.000
C -11.946 2.190 0.000
C -10.626 2.190 0.000
C -9.1920 2.190 0.000
K_POINTS {automatic}
10 1 1 0 0 0 file:
num_bands = 14
num_wann = 10
num_iter = 100
dis_num_iter = 100
dis_win_max = 10.0
dis_froz_max = 7.5
dis_froz_min = -12.84750
guiding_centres = .true.
mp_grid = 10 1 1
iprint = 2
num_dump_cycles = 100
num_print_cycles = 10
transport = true
transport_mode = bulk
one_dim_axis = x
dist_cutoff = 5.5
tran_win_min = -6.5
tran_win_max = 6.5
tran_energy_step = 0.01
fermi_energy = -2.5400
dist_cutoff_mode = one_dim
translation_centre_frac = 0.0 0.0 0.0
bands_plot = true
bands_plot_format = gnuplot
begin kpoint_path
G 0.00000 0.00000 0.00000 F 0.00000 0.50000 0.00000
F 0.00000 0.50000 0.00000 Q 0.00000 0.50000 0.50000
Q 0.00000 0.50000 0.50000 Z 0.00000 0.00000 0.50000
Z 0.00000 0.00000 0.50000 G 0.00000 0.00000 0.00000
end kpoint_path
begin projections
end projections
begin unit_cell_cart
6.291718261 0.000000000 0.000000000
0.000000000 5.499193194 0.000000000
0.000000000 0.000000000 5.499193889
end unit_cell_cart
begin atoms_cart
C -14.066411956 1.204322080 0.000000000
C -12.808128586 1.204324092 0.000000000
C -11.549743017 1.204325966 0.000000000
C -10.291392209 1.204322962 0.000000000
C -9.033033986 1.204321448 0.000000000
end atoms_cart
Begin KPoints
0.00000000 0.00000000 0.00000000
0.10000000 0.00000000 0.00000000
0.20000000 0.00000000 0.00000000
0.30000000 0.00000000 0.00000000
0.40000000 0.00000000 0.00000000
0.50000000 0.00000000 0.00000000
0.60000000 0.00000000 0.00000000
0.70000000 0.00000000 0.00000000
0.80000000 0.00000000 0.00000000
0.90000000 0.00000000 0.00000000
End KPoints
Relevant answer
Thanks !!
  • asked a question related to Gnuplot
12 answers
I want to know the exact command in gnuplot for plotting average curve of my graphs same as what I have seen in "lysozyme in water" , Justin tutorial graphs
Relevant answer
"Select the set S0, then the "median" running and put 50 in the "Length of the average". Close the frame after clicking on the "Accept" button."
Now, where is the average value? Only there is a red line in pressure.xvg
For exemple in the case of lysozyme,  the average value of the pressure is 1.05 bar
  • asked a question related to Gnuplot
15 answers
Dear everyone,
I have tried to plot the picture like the first attachment using a text file. The structure of the file is like:
#Time Energy Nd
1 0.1 2
2 0.1 4
3 0.1 5
1 0.2 9
2 0.2 10
3 0.2 15
And so on.
And then I use splot “datafile” u 1:2:3 with lines to plot the figure. However, there are lines between data of x axis and data of y axis. It is still different with the picture as it in the first attachment.
And I also want to plot a picture the same as the second attachment.
Could anybody give me some instructions on how to plot pictures like the following two in Gnuplot?
Thanks very much in advance!
With My Best Regards
Relevant answer
Dear Aparna,
Thanks very much! I will try that later.
Best Regards
  • asked a question related to Gnuplot
12 answers
I calculate DOS from VASP code with default NEDOS as well as increasing NEDOS with 3000. When I plot DOS from DOSCAR file it does not look good as we see in literature. Sometime one peak dos very large compared to other sometime all DOS peaks look zigzag.
I plot DOS in origin software. Sometime I use GNUPLOT  also. How can I improve plot quality ?
1: By any input parameter in VASP
2: By plotting software
3: Any other
I have attached here my simulation output files files as well as DOS plot and origin file.
Relevant answer
Dear SK Sharma,
     1: By any input parameter in VASP
               Tetrahedron method and  Fine k meshes are few important parameters to get a good DOS. 
  2: By plotting software
        Both origin and Gnuplot will give the good quality pictures.  
  • asked a question related to Gnuplot
1 answer
Hi all,
I did a simple script for calculation of winding distribution in 3D. I would like to have an output picture with coils colored according to their phases, but I am not able to set the right color for gnuplot output. In fltk the colors are okay, but the remaining part of the main software utilizes gnuplot as output program, so I cannot switch to fltk.
Is there any possibility to have this working? The output is made using this part of the code:
for pom = 1:C
% transformation from cylindrical coordinate system to cartesian
x = R.*cos(fi);
y = R.*sin(fi);
% drawing
if schema(pom) == 'U'
plot3(x, y, z, 'r-', 'linewidth', 1);
if schema(pom) == 'V'
plot3(x, y, z, 'b-', 'linewidth', 1);
if schema(pom) == 'W'
plot3(x, y, z, 'g-', 'linewidth', 1);
hold on
fi = fi + fi_c;
hold off
grid on
title('Vizualizace vinuti navrhovaneho stroje')
xlabel('r [m]', 'FontSize', 12)
ylabel('r [m]', 'FontSize', 12)
zlabel('z [m]', 'FontSize', 12)
xlim([-1.2*R_max 1.2*R_max])
ylim([-1.2*R_max 1.2*R_max])
zlim([-l_Fe-1.2*R_max 1.2*R_max])
saveas(1, 'cela.emf')
In the code R, fi, and z describe the coil, fi_c is the angular distance between coils, C is the amount of coils and schema is a vector of characters including the arrangemet of the winding. Outputs in from fltk and gnuplot are attached.
Thank you for your help,
Relevant answer
Don't know if that is what you want to do in octave.
  • asked a question related to Gnuplot
3 answers
Does anyone Know how to increase the width of the contour lines in gnuplot? I have used the following commands to obtain the contour lines:
gnuplot> splot 'data.txt' using 1:2:3 with lines
gnuplot> set contour base
gnuplot> unset surface
gnuplot> set view map
gnuplot> replot
Relevant answer
you should add lw parameter to the end of 1st line:
splot 'data.txt' using 1:2:3 with lines lw 3
  • asked a question related to Gnuplot
6 answers
I have installed cygwin in windows 7 and created a linux environment but when I plot even a simple function like sin(x), it gives an error like:
Version 4.2 patchlevel 6
last modified Sep 2009
System: Linux 2.6.32-358.23.2.el6.x86_64
Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009
Thomas Williams, Colin Kelley and many others
Type `help` to access the on-line reference manual.
The gnuplot FAQ is available from
Send bug reports and suggestions to <>
Terminal type set to 'x11'
gnuplot> plot sin(x)
gnuplot: unable to open display ''
gnuplot: X11 aborted.
How do i solve out this problem?
Relevant answer
my problem was resolved when i installed a xming for x11 forwarding through putty....
  • asked a question related to Gnuplot
2 answers
Hi all,
I have 3D data which I am trying to splot in GNUPLOT. The z-range of values is negative, going from 0 to -300. For some reason in both my X11 and postscript terminals the plane has been painted completely yellow which is 0 on the colour range, even though it drops down to -300 which is dark purple/black on the colorbox.
Apologies for the simplistic nature of this post. I was loath to ask here at all but I'm running out of steam. Many thanks
The code I am using:
set pm3d
set xlabel "ASN - HIS (nm)"
set ylabel "ASN - PRO (nm)"
set zlabel "FES (kJ/mol)"
#set cbrange [-300:0] <-- same as default
#set zrange [-300:0] <-- same as default
set ticslevel 0.2
#unset colorbox
unset key
set contour base
set pm3d at bs
splot 'FES_mouth.dat' with pm3d
Relevant answer
why don't you just multiply all your data by -1 or add 300 (I would add 300 to the data set so I wouldn't have to look at it upside down)?
  • asked a question related to Gnuplot
4 answers
Gnuplot does it but nos as well as I wish.
Relevant answer
VMD, in linux, windows, etc.
  • asked a question related to Gnuplot
6 answers
It would be helpful if the explanations are given for 3 categories:
1. Beginners using GUI
2. Wannabes using both GUI and TUI
3. Experts using TUI
Relevant answer
Matlab has a strong GUI, so learning and making plots is quite easy as compared to GNU Plot.
However, I would suggest you to switch to Python. It has dedicated libraries for Astronomy and Astrophysics that goes by the name 'astropy' ( ) . It has separate library for plotting 'matplotlib' (
Python, being an open source high level language, has really good documentations and is very easy to learn. Following is a link to tutorial for making 3D plots:
You can find numerous other examples under the 'Gallary' section on matplotlib web page.
  • asked a question related to Gnuplot
3 answers
See above
Relevant answer
This is no way to do it right from gnuplot, but it's simple still:
Step 1: merge columns of you two files in one using the following bash command
paste x_columnfile y_columnfile > merge.txt
Step 2: use the standard gnuplot with merge.txt
plot "merge.txt" using 1:2
You'll find below the link to the paste command in bash.
  • asked a question related to Gnuplot
5 answers
I am wondering how to make the best combination using latex and gnuplot. I am currently using the epslatex terminal in gnuplot and the link input to latex. Is there another more efficient way?
Relevant answer
Hi Jawad,
I have tried many different ways to achieve this integration. Here I share what I learn:
If you will keep your LaTeX source files and the data files together, you can try to use pgfplots package (I think that today is integrated in TikZ package), which give you a good way to control the plots directly from the LaTeX source file. It is a very nice package and have a lot of style options. Also pgfplots have a way to plot raw data by calling to GNUplot during the LaTeX compilation, or even to put directly in the text file your GNUplot script lines. See the manual for examples and details.
However, there is some drawbacks that I found with this approach:
- If you have many plots, the compilation could become very slow and
- your LaTeX project tends to become less portable.
The first problem can be partially solved by using the external library from TikZ package. It avoid to recompile the plots all the times, by saving an individual pdf of each plot (or tikzpicture). However, if you have a large data plot, and you want to change, for instance, the axis name, you'll have to recompile again. I made some LaTeX wraps commands to easily and cleanly place the pgfplots and control the external libraries (force to recompile, avoid to recompile, etc). If you are interested, I can post the codes.
The second problem (the project portability) is more important to me and was the reason that I abandon the pgfplot approach. At the end of the day, with pgfplot/GNUplot you will need to access to the raw data files to compile... and that could not be always easy to do. For instance, if you send the LaTeX source to a coworker, you have to send also the data, and the project could achieve a huge memory size. If can share without raw data using the TikZ external library... but any mistake... and you will have a broken project.
On the other hand.. Why to integrate with LaTeX and GNUplot the data files?
(EDIT: My apologies for the next, I didn't see that you already use this approach)
The last versions of GNUplot (I think after version 4.2) have a very nice epslatex terminal. I choose this way to work. With term option "standalone" you will get a .tex file that can be compile when you want to obtain the plot. Therefore, you can just make a GNUplot script with this terminal and use a regular includegraphics to place the plot in LaTeX. You can put any latex symbol in the gnuplot script file or even select the same font that you use in your latex document. Furthermore, you can share the .tex file (with the associated .eps file) of the plot in the same folder of your LaTeX project without memory size penalties. If any minor change is needed in the future (for example change the language of the axis, or the font size) you can change directly the tex file associated with the plot and then safety recompile. Here a mini-example:
set terminal epslatex size 15cm,10cm color standalone
set output 'portableplot.tex'
set xlabel 'latex \small codes \large here'
set ylabel 'Nice font'
plot [-10:10][] -x w l lt 1 lw 5 lc rgb 'red' t 'and maths $\frac{2}{3}$',\
sin(x) w l lt 1 lw 5 lc rgb 'black' t ' $\alpha\beta^2$'
  • asked a question related to Gnuplot
12 answers
I have a large 3D data set (~100 MBs in size) and good old Gnuplot does not only take too long to produce a plot, but I noticed that it produces inconsistent plots when the display grid is changed. I tried Mathematica and to my disappointment it didn't even produce the figure. Then I tried R, which seems much faster than Gnuplot, but I couldn't find a good reference on how to set the 3D plot parameters. Any helpful suggestions?
Relevant answer
maybe it is feasible to just plot a random subsample of the data within the environment you know.
in R, pretty much everything is possible. it is often helpful to build a minimal example and ask at stackoverflow or r-help mailing list about errors or solutions.
  • asked a question related to Gnuplot
7 answers
I don't want to solve it as z = z(x,y). In fact it would be helpfull if I can plot inequalities like f(x,y,z) < 0 and project the allowed region on the x-y plane .
Relevant answer
Oh, sorry.
Well, it seems a little more complicated, but it is implemented in the Maxima/Gnuplot interface: