Plots
Fill the curve with color from x axis or y axis
Write the following things..
gnuplot> plot (sin(x)/x)**2 with filledcurves x1
Comments: "filledcurves x2" will fill up upper x axis and so on as gnuplot command follows the rules..
Movie in GNUplot
- make a script file "my-movie.sh" which has these following lines
plot sin(x-t)
t=t+0.1
if(t<2.0) reread
- open gnuplot
- type the following things
gnuplot> t=-2.0
gnuplot> load "my-movie.sh"
gnuplot>
GNU plot: plot 1st column vs all other colums
G N U P L O T
Version 4.6 patchlevel 4 last modified 2013-10-02
Build System: Linux x86_64
Copyright (C) 1986-1993, 1998, 2004, 2007-2013
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'wxt'
gnuplot> plot for [col=2:40] "test-data.dat" using 1:col w l notitle lt 4
gnuplot>
Inkscape
Inkscape my new love for drawing schematic diagram of lattices and putting effects on plots etc. This is really really powerful software. Old people who uses xfig can consider this as their new weapon. And this is free. Can replace OmniGraffle of MAC OSX.
GNUPLOT
set pm3d
set view map
unset surface
set size 0.5,1.0
set palette model RGB defined (0 'black', 0.5 'green', 1.0 'white', 1.5 'red')
spl "data-1-2-3-separatedby-gap.dat" using 1:2:3
- Using both y1 and y2 axis [fig below].
- Very good quality pdf/eps file is generated.
- Legends are easy to make with different line style and point style. [That's why I like this much.]
- I use it because core in my heart I like Linux and grace is one plotting software which is the king of all.
This is the reason I like grace sometimes.
[My first LADY]
Recently I have learn how to get a 2dimension density plot in by GNUplot. The command is pm3d. But the most important point here to note is you should have the data in this fashion
x y z
1 2 3
1 34 65
1 5 76
1 5 89
2 4 7
2 5 78
2 9 3
So this separation after the x=1 block or x=2 block is important.
Sample command and result:
Now a days I am writing script file for gnuplot. Here we can write what to plot and then set terminal to create latex labeling and exporting the plotted file to pdf or ps as required. All in a single file and then one has to "load" this file into gnuplot terminal.
Q. How to use data column in gnuplot?
A. plot "data1.dat" using 1:($2**3)
this ($2) is to take the 2nd column of the and we can do square of the whole column.
Fitting in GNUplot
open gnuplot
gnuplot fit
plot "data1.dat"
f(x) = a*x+b
fit f(x) "data1.dat" via a,b
repl f(x)
Beautiful Legends Color and Point Style setting
# set style line 1 lc rgb 'black' pt 5 # square
# set style line 2 lc rgb 'black' pt 7 # circle
# set style line 3 lc rgb 'black' pt 9 # triangle