nokey causing not plotting a function?
- From: Mateusz Papiernik <mati@xxxxxxxxxxxx>
- Date: Sat, 08 Mar 2008 20:08:15 +0100
Hello,
I'm trying to get my GNUplot scripts working and am having troubles. I'm trying to plot two set of points from data files along with two fit curves for this data.
Strangely, gnuplot misses one of the function, especially when "set nokey" is used.
There is a sample script:
clear; reset
set terminal epslatex
set output "lewy.tex"
set size 0.6, 0.6
set samples 1000
set xrange [0:35]
set nokey
set xlabel "x [cm]"
set ylabel "t [s]"
set format xy "%.2f"
set pointsize 2
set yrange [1:1.40]
set style line 1 lt 1 lw 2
set style line 2 lt 2 lw 2
f(x) = a1*x**4 + b1*x**3 + c1*x**2 + d1*x + e1
g(x) = a2*x**4 + b2*x**3 + c2*x**2 + d2*x + e2
fit f(x) 'd:\praca\uczelnia\fizyka\112\o1.dat' u ($1*1.0):($2/19.0) via a1,b1,c1,d1,e1
fit g(x) 'd:\praca\uczelnia\fizyka\112\o2.dat' u ($1*1.0):($2/19.0) via a2,b2,c2,d2,e2
set xrange [0:2]
set yrange [1.25:1.28]
plot 'd:\praca\uczelnia\fizyka\112\o1.dat' u ($1*1.0):($2/19.0) with points pointtype 1 pointsize 2 title "O1", \
'd:\praca\uczelnia\fizyka\112\o2.dat' u ($1*1.0):($2/19.0) with points pointtype 2 pointsize 2 title "O2", \
f(x) ls 1, \
g(x) ls 2, \
g(x) ls 2
Only one function with lines is plotted - f(x). g(x) is not.
Strangely enough, even if "set nokey" is NOT used, the plot of g(x) does not appear until I use it twice, as shown. What can be the possible cause of such happenings?
I'm wasting second hour on trying to figure what's going on - maybe it's a known problem and you will just know :)
I'm using latest GNUplot release, binaries for Windows.
Best regards,
--
Mateusz Papiernik, Maticomp Webdesign
Projektowanie i realizacja witryn WWW
mati@xxxxxxxxxxxx, http://www.maticomp.net
"One man can make a difference" - Wilton Knight
.
- Follow-Ups:
- Re: nokey causing not plotting a function?
- From: Hans-Bernhard Bröker
- Re: nokey causing not plotting a function?
- Prev by Date: plotting a matrix
- Next by Date: Re: splot sqrt(x)*sqrt(y)
- Previous by thread: plotting a matrix
- Next by thread: Re: nokey causing not plotting a function?
- Index(es):
Relevant Pages
|
Loading