Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: 3d plot with residuals at bottom in color Followup-To: comp.graphics.apps.gnuplot Date: Sat, 25 Aug 2012 20:42:32 -0700 Organization: gnuplot development team Lines: 26 Message-ID: References: Reply-To: sfeam@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Sun, 26 Aug 2012 03:42:35 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="de68407e1e0278021e2f738a9cf7b10c"; logging-data="22576"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fh/qr44DPwNcOV2bthg80" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:Q1MJtnY5TiYsxBlY0agylINPv6I= Xref: csiph.com comp.graphics.apps.gnuplot:1361 stefan.meingast@gmail.com wrote: > Hi > > I have a 3d data set which I can easily display with splot. What I > want, however, is the following: > > The 3 axes simply contain the 3d data and I also want to show a 3d-fit > (i.e. a plane) which I also know already. Thats simple enough, but I > would like to show the residuals of the fit to the data as a color map > on the bottom of the graph. > > Is that somehow possible? Let P(x,y) be the equation for the plane fit. Suppose your data is in columns 1, 2, and 3. The the following command will plot 1) The data 2) The plane fit to the data 3) A pm3d (heat map) representation of the residual projected onto the xy plane splot 'data' using 1:2:3 with points, \ P(x,y) using lines, \ 1:2:(0):($3 - P($1,$2)) using pm3d (warning: this command not tested on actual data)