Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to I set the color map of a 3d graph programmatically using visual basic .net?

Highlighted

I’m currently working in visual basic .net and need to both change the colors of a 3d contour plot and eventually create legend for that plot. I also would like to draw graphics over the plot (a circle for example), representing the geometry of the current data I am plotting.  This all needs to be done programmatically, not thru the properties setup of the 3dgraph.  How can this be done? 

 

Thank you,

Russ

0 Kudos
Message 1 of 3
(1,425 Views)

Hi Russ,

 

I am assuming that you are using the CWGraph3D Control so here is some information on this. First off, attached is a 3DGraph example that demonstrates how to programmatically set certain zoom features.  I know that you are not looking at zoom features, but as soon as you type in the GraphName and then the dot operator (Graph.), you will see a list of available methods and properties.  For example, the name of the 3D graph in the example is Graph3D1. See below for a quick example of some code. 

'Create the caption "Temperature vs. Time"
CWGraph3D1.Caption = "Temperature vs. Time"
'Set the caption text color to red
CWGraph3D1.CaptionColor = vbRed
'Set the caption background color to green
CWGraph3D1.BackColor = vbGreen
'Set the caption font to bold
CWGraph3D1.Font.Bold = True

Here is a link to a great tutorial on 3D graphs.  I am also attaching the CWGraph3D help file so you can see a list of the properties. This help file can be found at Start >> All Programs >> National Instruments >> Measurement Studio >> Help >> Measurement Studio Reference.

 

Hope this helps!

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 3
(1,413 Views)
Perfect! Thanks Jonathan. I didnt have those help files and was having a hell of a time trying to guess the correct format.
0 Kudos
Message 3 of 3
(1,394 Views)