epix-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ePiX-users] 3D datafile plotting


From: Constantin Greubel
Subject: Re: [ePiX-users] 3D datafile plotting
Date: Sat, 29 Nov 2008 05:03:02 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081122)

Andrew D. Hwang schrieb:
On Fri, 28 Nov 2008, Constantin Greubel wrote:

one simple question: Is it possible to generate a 3D plot where the data
points come from a datafile?

Hi Constantin,

Yes. :)  For example, to make a 3D scatter plot with BOX markers using the
first three columns of a data file, you can do:

datafile df("myfile.dat");
df.plot(BOX, 1, 2, 3);

In case it's useful, if F is a P-valued function of three doubles, the
command

df.plot(BOX, i1, i2, i3, F);

creates a 3-D scatter plot by passing columns i1, i2, and i3 to F and
plotting the resulting points.

Best,
Andy

Is it also possible to plot surfaces instead of scattered points? E.g. like the pole.xp sample, but points given through a datafile instead of a function.

I have tried to build a function, that takes two points and a datafile

P Function(double x, double y, data_file DF){
        return P(x, y, DF.column(3)[2]); //dummy return
}
...
surface(Function, R);

but this won't work. Are there any other possibilities?

MfG
        Constantin Greubel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]