Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2996

Re: 3D mesh plotting with a fourth column of data for colouring pm3d

From Ethan A Merritt <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: 3D mesh plotting with a fourth column of data for colouring pm3d
Date 2015-07-22 11:55 -0700
Organization gnuplot development
Message-ID <mooosg$uaf$1@dont-email.me> (permalink)
References <5cea66c0-f6e0-44d6-8f31-30b8de0c62b9@googlegroups.com> <62fd5eb6-784e-446b-a59e-6c7a60ee7f11@googlegroups.com>

Show all headers | View raw


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

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

3D mesh plotting with a fourth column of data for colouring pm3d Javiere <javierevergarab@gmail.com> - 2015-07-22 10:41 -0700
  Re: 3D mesh plotting with a fourth column of data for colouring pm3d javierevergarab@gmail.com - 2015-07-22 11:03 -0700
    Re: 3D mesh plotting with a fourth column of data for colouring pm3d Ethan A Merritt <sfeam@users.sourceforge.net> - 2015-07-22 11:55 -0700
      Re: 3D mesh plotting with a fourth column of data for colouring pm3d Javiere <javierevergarab@gmail.com> - 2015-07-24 10:11 -0700
        Re: 3D mesh plotting with a fourth column of data for colouring pm3d Ethan A Merritt <EAMerritt@gmail.com> - 2015-07-24 22:54 -0700
          Re: 3D mesh plotting with a fourth column of data for colouring pm3d Javiere <javierevergarab@gmail.com> - 2015-07-28 19:14 -0700

csiph-web