Loading
2014. 12. 3. 16:48 - Phil lee

Drawing Graph eps file; GNU Plot

 

GNU plot.zip


[Draw the graph by uisng GNU plot]

- Input Format - 'dd.tab'

the left side of dd.tab is degree, and the right side of dd.tab is the number of degree.

ex) 1    10 # The graph has 10 nodes whose degrees are 1.

 

To create the plot, change the dd.tab, and run the following command:

$ gnuplot degreedist.plt

 

Then dd.eps will be created. To convert it to pdf:

$ epstopdf dd.eps

Then dd.pdf will be created.


============================================================================================


set key top right box

set logscale xy 10

set format x "10^{%L}"

set format y "10^{%L}"

 

set yrange [1:1e8]

set xrange [1:1e7]

set xlabel "Degree"

set ylabel "Count" offset 0,1

set terminal postscript enhanced eps 30 color

set output 'dd.eps'

plot     "dd.tab" using 1:2 title "Twitter" pt 1 ps 1.5 lc 3 lw 2.5

 

Example)