LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

3D graph - several 3D plots on the same graph

I replied to Adeline62's post since it's the same issue, but it might be overlooked and not get help.

 

I guess I followed Adeline62's steps, but I still only get the last drawing shown up after I finished drawing all plots. Do I need to add anything alse? The following is my cope.

 

 

 CW3DGraphLib_CWPlots3DItem (plotsHandle, NULL, CA_VariantInt(1), &plotHandle);
 CW3DGraphLib_CWPlot3DPlot3DSurface (plotHandle, NULL, xArray, yArray, dArray, CA_DEFAULT_VAL);
 CW3DGraphLib_CWPlot3DSetMultiPlot (plotHandle, NULL, VTRUE);

 for (i=0; i<k; i++)
 {
     j=i+2;
     CA_VariantSet2DArray (&dArray, CAVT_DOUBLE, m, n, &cz[i]);
     CA_VariantSet1DArray (&xArray, CAVT_DOUBLE, m, &cx[i]);
     CA_VariantSet1DArray (&yArray, CAVT_DOUBLE, n, &cy[i]);
     CW3DGraphLib_CWPlots3DItem (plotsHandle, NULL, CA_VariantInt(j),&plotHandle);
     CW3DGraphLib_CWPlot3DPlot3DSurface (plotHandle, NULL, xArray, yArray, dArray, CA_DEFAULT_VAL);
     CW3DGraphLib_CWPlot3DSetMultiPlot (plotHandle, NULL, VTRUE);

 }

CW3DGraphLib_CWPlot3DSetMultiPlot (plotHandle, NULL, VFALSE);

0 Kudos
Message 1 of 4
(3,192 Views)

Hello yanchu,

 

I was wondering if you could provide a link to the other forum so I can take a look at it and get a better idea of what is going on. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,162 Views)

Hi Adam,

 

I don't know how to creat a link yet, so just copied the content from another forum.

 

Thanks,

Yanchu

 

 

0 Kudos
Message 3 of 4
(3,153 Views)

Hello yanchu,

 

Here is an example that will plot two graphs at once. Let me know if you have any questions.

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,132 Views)