Pages

mercredi 7 mars 2012

plot in gnuplot4.4

Here are some often-used commands of gnuplot ........


0) help set xlabel
to get help

1) plot "datafile1"  using   index1_of_column_to_be_plotted   t  "titlename", "datafile2"  using   index2_of_column_to_be_plotted   t  "titlename",  " "  using   index3_of_column_to_be_plotted   t  "titlename",


This will plot the column of data with index1_of_column_to_be_plotted from datafile1, where "t" for command title; then plot the column of data with index2_of_column_to_be_plotted from datafile2; then plot the column of data with index2_of_column_to_be_plotted from datafile2 again

2) set xtics Integer
where the integer is the show the tics in a step of Integer

3) set xrange [Int1: Int2]

4) set title "string"

5) set xlabel "string"

6) set terminal jpeg medium
to set the figures to be saved in jpeg format

7) set output "filename"
set the output filename to be saved


A simple summary from http://physicspmb.ukzn.ac.za/index.php/Gnuplot_tutorial is copied below:

Make a titleset title 'Graph of velocity versus time'
Label x axisset xlabel 'Time(s)'
Label y axisset ylabel 'Velocity(m/s\^2)'
Adjust the tick marksset xtics 0.1
set ytics 0.1
Adjust no. of minor tick marksset mxtics 4
Move the keyset key bottom left
set key top right
Change the key textplot sin(x) title "new text"
Remove the keyunset key
Set plot aspect ratioset size square
 :A wide plotset size ratio 0.25
 :A narrow tall plotset size ratio 2
Adjust the xrangeset xrange[-3:5]
Adjust the lower xrange, upper autoset xrange[-3:*]
Adjust the upper xrange, lower autoset xrange[*:5]
Use a logarithmic x axisset logscale x
Use a logarithmic y axisset logscale y
Draw a grid on major ticsset grid y

Aucun commentaire:

Enregistrer un commentaire