Difference between revisions of "Gnuplot"

From orch
Jump to: navigation, search
(First script)
 
Line 54: Line 54:
 
   R_GRAPH = "set lmargin at screen 0.61; set rmargin at screen 0.94"
 
   R_GRAPH = "set lmargin at screen 0.61; set rmargin at screen 0.94"
 
</code>
 
</code>
 
 
  
 
== Multiplot ==
 
== Multiplot ==

Latest revision as of 16:03, 11 March 2016

First script

  set terminal postscript eps enhanced color "Times-Roman" 20

  set style line 1 linetype 1 linecolor rgb "696969" linewidth 3.0 pointtype 1
  set style line 2 linetype 1 linecolor rob "FF6600" linewidth 3.0 pointtype 1

  set output "graph.eps"

  a = 0.8
  f(x) = a * cos(x)
  g(x) = a * sin(x)

  pi = 3.14159265359

  set xrange [0:3*pi]
  set yrange [-1:1]

  set xlabel "x coordinate"
  unset ylabel

  plot f(x) with points title 'sin(x)' ls 1,\
       g(x) with points notitle ls 2

Macros

  set macros

  T_GRAPH = "set tmargin at screen 0.99; set bmargin at screen 0.81"
  B_GRAPH = "set tmargin at screen 0.74; set bmargin at screen 0.56"

  L_GRAPH = "set lmargin at screen 0.12; set rmargin at screen 0.45"
  R_GRAPH = "set lmargin at screen 0.61; set rmargin at screen 0.94"

Multiplot

  set multiplot
  unset multiplot