Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3144
| Path | csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Karl-Friedrich Ratzsch <mail.kfr@gmx.net> |
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Plot fit function on a defined range |
| Date | Sun, 29 Nov 2015 13:13:03 +0100 |
| Organization | solani.org |
| Lines | 51 |
| Message-ID | <n3eq48$llj$1@solani.org> (permalink) |
| References | <a58b272e-10d9-48af-90d5-a780b5ae385e@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | solani.org 1448799176 22195 eJwNydERACEIA9GaPJIclCOI/Zcgs19vlqal+iEKvFMxso0AvnSt6rt1mIjtg6gsudLDZpzWAyL7Edg= (29 Nov 2015 12:12:56 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sun, 29 Nov 2015 12:12:56 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| X-User-ID | eJwFwYEBwCAIA7CXkELRc1iV/09YkuCiKpiMnJyq8rXje3Ph4YA1BfHp1sYZ0DvbdGTWiv4BDm0Q8g== |
| In-Reply-To | <a58b272e-10d9-48af-90d5-a780b5ae385e@googlegroups.com> |
| Cancel-Lock | sha1:5jYlzSQsm+17229lA52waYyKI7w= |
| X-NNTP-Posting-Host | eJwNyMEBwCAIA8CVEBLEcRBh/xHaex7Nl9eG08HhmJU9jZeVMUBTUiCxVfhwlnc3Ttf9J3hTPxqhEP4= |
| X-Enigmail-Draft-Status | N1110 |
| Xref | csiph.com comp.graphics.apps.gnuplot:3144 |
Show key headers only | View raw
The first range specifier in a plot command supersedes the range
specified by "set xrange", unless you mark it with the keyword "sample":
set xrange [0:10]
plot sample [2:4] f(x), [1:3] sin(x)
Try it on an interactive terminal first so you don't have to run
LaTeX every time before you see a resukt.
And your example graph looks like you do several plots on the same
output file. You should either use a single plot command
plot f1(x), "data1", \
f2(x), "data2", \
....
or first plot everything to an interactive terminal like "wxt" and
then use a single "replot" command to plot everything to your eps file.
The terminals for file output don't have a well defined behaviour
for plotting to them more than once.
Karl
Am 29.11.2015 um 02:22 schrieb Axel:
> 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 the points with polynomial functions. I am looking to plot the functions only on specific x- and y-ranges (different from function to function) where the extremes of the ranges are decimal numbers.
>
> When trying to do this, I obtain a mess: it seems that gnuplot considers every 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 xrange [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 xrange [0:1]
> set yrange [50:80]
> set grid
> unset key
> set output 'name.tex'
> f(x) = 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.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Plot fit function on a defined range Axel <axeldibert@gmail.com> - 2015-11-28 17:22 -0800 Re: Plot fit function on a defined range Karl-Friedrich Ratzsch <mail.kfr@gmx.net> - 2015-11-29 13:13 +0100 Re: Plot fit function on a defined range Axel <axeldibert@gmail.com> - 2015-12-04 17:04 -0800
csiph-web