|
From: Ethan M. <merritt@u.washington.edu> - 2005-08-16 17:06:31
|
On Tuesday 16 August 2005 09:58 am, Robert Hart wrote: > On Tue, 2005-08-16 at 09:26 -0700, Ethan Merritt wrote: > > > That works, or would if you put parens around the expression: > > set pm3d > > splot "data" using 1:2:3:(rgb($1,$2,$3)) with lines > > > > Are you sure? This just gives: undefined function rgb. I assumed that "rgb" was a user-defined function that assigned an rgb color on the basis of 3D coords x, y, and z. If you meant something else entirely, then please explain. > I even resorted to scanning through the source, but AFAICT the colour > for a data series is defined only once, when the plot command is parsed, > but before the data file is read. > > e.g. I have the data below, where the columns are r,g,b,frequency, and > colorname > > I would like to plot "rgb space" such that preferably each point is > located at (r,g,b), sized according to the frequency, and coloured to > match the original colour. > > splot "data" using 1:2:3:4 with points pointsize variable > > gets me most of the way there, but the colour remains elusive. I still don't understand what the function rgb() is expected to do, but if you provide the function then the following command will plot with color generated by the rgb() function and pointsize taken from column 4 (tested; works here): set pm3d splot "data" using 1:2:3:(rgb($1,$2,$3)):4 with points lt palette ps variable > I would > be willing to sacrifice the sizing of points to get the colours right > (or overlay coloured blobs on scaled points for example) > > 36, 33, 26, 47, #24211A > 44, 32, 27, 7, #2C201B > 53, 35, 29, 18, #35231D > 89, 39, 27, 9, #59271B > 80, 44, 38, 12, #502C26 > 108, 54, 42, 10, #6C362A > 95, 58, 68, 5, #5F3A44 > 118, 68, 54, 9, #764436 > 115, 78, 76, 6, #734E4C > 138, 54, 32, 13, #8A3620 > 144, 78, 50, 8, #904E32 > 163, 86, 42, 9, #A3562A > 181, 110, 52, 17, #B56E34 > 153, 103, 87, 12, #996757 > 175, 116, 79, 7, #AF744F > 194, 122, 83, 12, #C27A53 > 155, 124, 131, 4, #9B7C83 > 157, 132, 122, 5, #9D847A > 187, 133, 84, 11, #BB8554 > 185, 139, 109, 11, #B98B6D > 196, 134, 62, 14, #C4863E > 201, 143, 79, 17, #C98F4F > 203, 151, 88, 20, #CB9758 > 202, 154, 103, 16, #CA9A67 > 201, 150, 113, 13, #C99671 > 211, 162, 92, 53, #D3A25C > 207, 163, 114, 51, #CFA372 > 213, 166, 104, 49, #D5A668 > 214, 170, 119, 45, #D6AA77 > 221, 178, 123, 64, #DDB27B > 227, 183, 124, 40, #E3B77C > 177, 156, 154, 13, #B19C9A > 205, 152, 137, 14, #CD9889 > 213, 158, 161, 7, #D59EA1 > 207, 168, 142, 20, #CFA88E > 214, 172, 133, 34, #D6AC85 > 220, 180, 135, 65, #DCB487 > 220, 182, 150, 49, #DCB696 > 216, 184, 168, 21, #D8B8A8 > 225, 174, 147, 16, #E1AE93 > 227, 186, 136, 43, #E3BA88 > 227, 188, 150, 50, #E3BC96 > 227, 189, 164, 46, #E3BDA4 > 201, 188, 194, 4, #C9BCC2 > 233, 194, 139, 56, #E9C28B > 234, 198, 153, 73, #EAC699 > 241, 204, 156, 48, #F1CC9C > 235, 201, 167, 52, #EBC9A7 > 240, 208, 175, 42, #F0D0AF > 234, 203, 181, 28, #EACBB5 > 238, 210, 181, 15, #EED2B5 > 239, 215, 185, 25, #EFD7B9 > 241, 206, 167, 19, #F1CEA7 > 243, 211, 171, 84, #F3D3AB > 245, 215, 184, 104, #F5D7B8 > 214, 202, 201, 6, #D6CAC9 > 235, 213, 202, 23, #EBD5CA > 247, 220, 195, 51, #F7DCC3 > 250, 229, 201, 108, #FAE5C9 > 252, 235, 214, 36, #FCEBD6 > 253, 241, 220, 25, #FDF1DC > 249, 235, 229, 19, #F9EBE5 > 254, 244, 229, 25, #FEF4E5 > 255, 255, 255, 1204, #FFFFFF > > -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |