PDA

View Full Version : Qwt3Dplot points(x,y,z)



avmg
29th July 2014, 17:56
Hi,

I want to plot points defined as (x, y, z) coordinates using Qwt3Dplot libraries. I only found the way to plot using surfaces functions, but not raw data. I saw people asking this question before but they didn't have answer.

Any suggestion?

Thanks,
Andrew

avmg
29th September 2014, 15:59
Hi again,
Finally i solved using volumeplot type, here i attach an example of the process:


//Creating a widget and adding a VolumePlot inside:
QWidget *wm3D = new QWidget(this);
m3Dplot = new VolumePlot(wm3D);

//Function example of how to add data:
void form::add_m3Ddata_point(double x, double y, double z){
m3Ddata.push_back(Voxel(x,y,z,0,0,255,255)); // The last 4 numbers are for select the color in rgba format
}

//Adding the data to the VolumePlot:
m3Dplot->createDataset(m3Ddata,true);
m3Dplot->updateData();
m3Dplot->updateGL();

Thanks!