Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: 3D mesh plotting with a fourth column of data for colouring pm3d Date: Wed, 22 Jul 2015 11:55:36 -0700 Organization: gnuplot development Lines: 45 Message-ID: References: <5cea66c0-f6e0-44d6-8f31-30b8de0c62b9@googlegroups.com> <62fd5eb6-784e-446b-a59e-6c7a60ee7f11@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Wed, 22 Jul 2015 18:54:08 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="8e86a57dfa599721f116da4577f3d1af"; logging-data="31055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Xr5nXZQdzaKxuJwiLU/Vr" User-Agent: KNode/4.10.5 Cancel-Lock: sha1:tXRSoOnf+a5YnsL7yHXZi+6BfNU= Xref: csiph.com comp.graphics.apps.gnuplot:2996 javierevergarab@gmail.com wrote: > On Wednesday, July 22, 2015 at 12:41:46 PM UTC-5, Javiere wrote: >> Dear all. >> >> My 3d mesh plotting is currently being colored using gnuplot pm3d. >> However the pm3d colours should be related to a variable different from >> the z value. >> >> It is indicated that (in addition to x,y,z) a fourth column of data >> should be used for gnuplot to read RGB color information >> (http://www.gnuplotting.org/manpage-gnuplot-4-6/#Q1-1-536). >> >> >> Can anybody can let me know how to relate number values with colours? > > It clear to me the command required to do the plotting: > splot ... using 1:2:3:4 with pm3d lc rgb variable. > > I do not know how to relate the 4th column values with RGB colours. The 4th column in that case is interpreted as a 24-bit integer with containing 8-bit color components (integers 0-255) I.e. foo = (Red << 16) + (Green << 8) + (Blue) Gnuplot can read hexadecimal numbers, so one possible format for the 4th column is 0xffffff # white 0xff0000 # pure red 0x7f007f # half intensity magenta and so on. >> I only recently started using gnuplot and am further constrained by the >> fact that gnuplot site is temporarily offline >> (http://gnuplot.sourceforge.net/demo/). Older copy of relevant demo: http://skuld.bmsc.washington.edu/~merritt/gnuplot/demo_canvas/heatmaps.html Ethan