|
From: Robyn S. <ro...@MI...> - 2007-09-20 17:46:14
|
Hello, I'd like to represent some 4D data and am having trouble convincing gnuplot to do it. The data consists of locations in a 3-dimensional volume, e.g. (r, theta, phi), with a value associated with each location. I'd like gnuplot to make a 3D scatter plot, color each point according to its value, and display a color scale. From the manual it seemed like the way to do this would be: set cbrange [range of values] set log cb to color points on a log scale, and then use palette cb to make the colors go as I want: splot "density31.dat" using 1:3:2 with points lt palette cb $4 (if you're curious, the positions are actually in spherical coordinates using a slightly different mapping than the one in gnuplot, hence the out-of-order columns.) The problem is that palette cb will apparently only take a constant value as an argument, so the command above fails, giving me an "undefined value" error on the argument to palette cb. (The command works fine if I replace the column argument $4 with a constant value, but then all the points are the same color.) I can probably come up with a way to use "rgb variable" to do this, but then I don't get a color scale. There were several similar questions to this already on the newsgroup but most of them had either no response or a minimal (and pessimistic one). Is there a way to get the output I want from gnuplot (maybe with rgbformulae?) or should I give up and use a different program? I have limited access to the newsgroup but if I am able to work out the method of doing this I'll summarize it and document it on my personal website and post a link to the group, so please reply by email to me. Thanks very much, R |