X-Received: by 10.182.95.69 with SMTP id di5mr35018851obb.31.1448760160230; Sat, 28 Nov 2015 17:22:40 -0800 (PST) X-Received: by 10.182.42.195 with SMTP id q3mr582598obl.3.1448760160206; Sat, 28 Nov 2015 17:22:40 -0800 (PST) Path: csiph.com!xmission!news.glorb.com!mv3no6621408igc.0!news-out.google.com!l1ni343igd.0!nntp.google.com!mv3no6621407igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Sat, 28 Nov 2015 17:22:40 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=5.170.208.182; posting-account=K5nWkAoAAAA-E7RSUk3dYZht_XnxSns6 NNTP-Posting-Host: 5.170.208.182 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Plot fit function on a defined range From: Axel Injection-Date: Sun, 29 Nov 2015 01:22:40 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.graphics.apps.gnuplot:3143 Hi to all the community! I am new here and I need a hand to solve the issue described below. I have five sets of experimental data named {1, ..., 5}.txt and I fitted th= e points with polynomial functions. I am looking to plot the functions only= on specific x- and y-ranges (different from function to function) where th= e extremes of the ranges are decimal numbers. When trying to do this, I obtain a mess: it seems that gnuplot considers ev= ery range defined for a function with 'plot [x-range][y-range] etc.' as it= were the range of the axis of the graph previously defined with 'set xrang= e [x1:x2]' and 'set yrange [y1:y2]'. How can I avoid this behavior? Example: http://i66.tinypic.com/21nldom.jpg The script is the following: set terminal epslatex color set decimalsign locale [comma] set title "Title" set format x "$%0.3f$" set format y "$%0.1f$" set xlabel "Label" set ylabel "Label" set xrange [0:1] set yrange [50:80] set grid unset key set output 'name.tex' f(x) =3D a*x**3 + b*x**2 + c*x + d [...] fit f(x) '1.txt' using 2:1 via a, b, c, d [...] plot [0.9000:1][60.0:70.0] f(x) linecolor rgb "black" [...] I am using gnuplot 5.0 patchlevel 1 on Mac OS X El Capitan. I really appreciate any help! Axel