Thanks for your help. I finally figured it out with your hints and those of others. I first need to mark, then I use compute to combine the marked data and the original data with output "[a.0,b.1]" if I ultimately want to data[1] versus position[0]. I then unmark, making these the new coordinates and then I compute to select [a.3], as I want to color on data[3]. At this point I have 2D positions with a scalar value, and so I color.
I thought that at this point I could just run this into an image, but that failed. So then I marked and used compute to select [a.0], I then unmarked and used compute with the marked and unmarked inputs and selected [b.1], so now I had a 1D array ready for plot, colored according to the original data[3], which is now not in the field. I then ran this into plot. On another note - is there a way to specify where in the image the plot rectangle is located? I.e., specifying [[0.2,0.2],[0.9,0.9]] might leave 20% of the lower and left sides for the labels and 10% of the upper and right sides for blank margins? Thanks......John Cary On Sat, 24 Jul 2004, Donna L Gresh wrote: > I don't know exactly how you are doing the scatter plot projections with > (x,y) but presumably you somehow get these into the "positions" component. > AutoColor works on the "data" component, which you may not have in your > field (use "Print" with the "r" option to look at what you have). You can > use Mark to mark the "positions" as "data" so that autocolor will see it. > (it won't actually remove them from the "positions"; it's more like a > "copy") After using Mark, do the thing with Compute referenced below to > extract just the one component. > > There are a number of examples of doing things like this in the samples. > Look for examples that use Mark and I think you'll start to understand the > logic flow of some typical programs better. > > Donna L. Gresh > Optimization and Mathematical Software Group > IBM T.J. Watson Research Center > (914) 945-2472 > http://www.research.ibm.com/people/g/donnagresh > [EMAIL PROTECTED] > > > > > "John R. Cary" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 07/23/2004 06:38 PM > Please respond to > opendx-users > > > To > [email protected] > cc > > Subject > Re: [opendx-users] Coloring points based on one component of a vector > > > > > > > Thanks for your reply. But then how does the a.0 data > (to be plotted as y) get colored by what comes out > of AutoColor? > > Thanks again.....John > > > On Fri, 23 Jul 2004, Joel Richardson wrote: > > > > > Assuming the "data" component holds the 4-vectors and > > that the 4th vector element holds the internal > > variable, you could do this: > > > > ...->Compute("a.3")->AutoColor()->... > > > > Cheers, > > Joel > > > > > > > > I have a 4-vector on an irregular set of points. (A collection > > > of particles with 3 velocities and one internal variable > > > that are at irregular positions in space.) I can > > > easily do the various scatter plot projections that I need > > > with all points black. However, I would like to be able to > > > have the point colored depending on the value of the extra > > > internal variable. > > > > > > Can this be done with OpenDX? Any hints on getting started? > > > > > > Thanks.....John Cary > > > > > > -- > > > John R. Cary > > > Professor, Dept. of Physics, University of Colorado, Boulder, CO > 80309-0390 > > > [EMAIL PROTECTED] > > > ph. (303) 492-1489 fax (303) 492-0642 cell (720) > 839-5997 > > > > > > > > > =============================================================== > > Joel Richardson, Ph.D. [EMAIL PROTECTED] > > The Jackson Laboratory Phone: (207) > 288-6435 > > 600 Main Street Fax: > (207) 288-6132 > > Bar Harbor, Maine 04609 URL: > www.informatics.jax.org > > =============================================================== > > > > > > -- John R. Cary Professor, Dept. of Physics, University of Colorado, Boulder, CO 80309-0390 [EMAIL PROTECTED] ph. (303) 492-1489 fax (303) 492-0642 cell (720) 839-5997
