Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #788

Re: Plotting very simple Graph

From Ingo Thies <ingo.thies@gmx.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Plotting very simple Graph
Date 2011-12-26 18:48 +0100
Message-ID <9lrqbtFepqU1@mid.individual.net> (permalink)
References <e6134101-ea14-475f-992b-aa425ce43b22@d10g2000vbh.googlegroups.com>

Show all headers | View raw


Hi Christian!

Maybe the following might be helpful to you. You probably should insert 
something more useful label in the xlabel and ylabel commands. You 
should also adjust the font size

If you need Encapsulated Postscript (e.g. for LaTeX), use this terminal 
definition:

set term postscript eps color size 15cm,10cm "Helvetica" 20
set output 'a.eps'

If you need PNG, use this:

set term png size 800,600
set output 'a.png'

and don't forget to adjuste the sizes to a fitting value for your paper. 
Then insert (and edit where needed):

lws=1.0; pss=2.0
set style line 1 lt 1 pt 1 lw 1.0*lws ps 1.0*pss lc rgb '#ff0000'
set style line 2 lt 1 pt 2 lw 1.0*lws ps 1.0*pss lc rgb '#0000ff'
a(x) = 71 * 0.9855**x
b(x) = 71 * 0.9775**x
ymin=b(15.)
ymax=71.
print 'ymin,ymax = ',ymin,ymax
set xlabel 'n'      # maybe some more useful text
set ylabel 'a,b(n)' # should be used as axis labels
set xrange [0:15]
set yrange [ymin:ymax]
set samples 16 # this makes gnuplot plot 16 points, i.e. 0...15
plot a(x) t 'a(n)' w p ls 1, b(x) t 'b(n)' w p ls 2

Note that gnuplot requires abscissa values to be referred to as x here, 
but x ist your n. And note that "#" is a comment indicator (making 
everything right to it be ignored by gnuplot) except for the rgb 
'#******' which is a hex RGB specifier.

HTH

-- 
Gruß,
       Ingo

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Plotting very simple Graph Christian Brech <christian.brech@googlemail.com> - 2011-12-26 08:30 -0800
  Re: Plotting very simple Graph Ingo Thies <ingo.thies@gmx.de> - 2011-12-26 18:48 +0100
    Re: Plotting very simple Graph Christian Brech <christian.brech@googlemail.com> - 2011-12-26 13:09 -0800

csiph-web