Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Substract value from contour line to surface Date: Tue, 18 Sep 2018 17:43:28 +0200 Organization: solani.org Lines: 72 Message-ID: References: <452156f4-823d-4c96-822e-0ef8d56b0d81@googlegroups.com> <1b1b4ef8-c458-426a-872b-cba3db812414@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1537285408 5207 127.0.0.43 (18 Sep 2018 15:43:28 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 18 Sep 2018 15:43:28 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 X-User-ID: eJwNyskRwDAIBLCWuBbscljG9F9CorfgqTkViQwstlZfL3X44Fihpb0i74TzX9Li1uZ1xFD3fC1REMM= In-Reply-To: Content-Language: de-DE-1901 Cancel-Lock: sha1:KCcX+b2pJpsgJ7ylziWO5nLFn0A= Xref: csiph.com comp.graphics.apps.gnuplot:4043 Am 18.09.2018 um 09:36 schrieb laterite@laposte.net: > Le mardi 18 septembre 2018 07:47:00 UTC+2, Karl Ratzsch a écrit : >> Am 18.09.2018 um 07:08 schrieb laterite@laposte.net: >>> Le lundi 17 septembre 2018 22:25:51 UTC+2, Hans-Bernhard Bröker a écrit : >>>> Am 17.09.2018 um 17:17 schrieb laterite@laposte.net: >>>>> Hi, >>>>> >>>>> I have an analytical 2D function G(x,y) and a .dat file giving me the x0,y0 points solution of the equation G(x0,y0)=0 in a .dat file. >>>> >>>> There is not really such a thing as "the" points that fulfill that >>>> criterion --- at least none where that whole set fits into a finite-size >>>> data file. So let's say you have some subset of that in a file. >>>> >>>>> Now, I would like to plot the surface of the function G(x,y0)-G(x0,y0). >>>> >>>> How isn't that the exact same surface as G(x,y) itself? You've just >>>> renamed the second independent variable and subtracted a constant zero! >>> >>> >>> Sorry, my bad, I made a mistake in my explanation : >>> >>> I have an analytical 2D function G(x,y) and a .dat file giving me a subset of x0,y0 points solution of the equation dG/dx|_y=0 in a .dat file. >>> >>> And no I want to plot G(x,y0)-G(x0,y0) >>> >> >> What are x0 and y0, i.e. which pair from your solution data file do you >> want to use for this plot? >> >> Or do you want the set of all those curves? > > I want to plot the surface of those. > I still don't follow completely, but if I understand correctly, the basic problem is you can't easily mix a data plot in direction x with a function plot in direction y. It might work like following (you'll have to figure out the exact syntax yourself, no time now) - the special file name "++" generates a grid of two independent variables which are varied over the set range - you could write your y0 values into an array from which you read them by using y as the indexing variable (set y sampling accordingly). - the splot command would look somethign like following splot sample [x=-10:10] [y=1:14] "++" \ using 1:(y0[t(y)]):G(x,y0[t(y)])-G(x0,y0[t(y)]) where t(y) = trunc(y) to give you an integer variable. Something along this line. Good luck! A simpler version is splot for [i=1:14] "+" using 1:(y0[i]):(G(x,y0[i])) but that's not a surface plot. Karl