LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scale graph

Solved!
Go to solution

Hi

 

I am using the following fuctions to draw a graph in visual studio by using the labview include libs:

 

InitCVIRTE();

NewPanel();

NewCtrl();

DisplayPanel();

SetAxisScalingMode();

PlotStripChart();

 

 

I can change the size of the background window by changing the values in the function NewPanel, but I don´t know how to change the size of the graph. I want it to fill most of the screen. I have also tryed with the function SetAxisScalingMode but it did not change the size og the graph it only changed the Scaling.

 

How do I change the size og the graph?

 

BR

Benjamin

 

0 Kudos
Message 1 of 5
(3,175 Views)
You should use SetCtrlAttribute with ATTR_HEIGHT and ATTR_WIDTH to change the graph dimensions. SetAxisScalingMode is only aimed to alter the axis scales, as you already observed, leaving control dimensions untouched. Axis scales are not affected by changes in control dimensions: however, you may observe changes in tick marks of the scale when chenging graph size if you are using automatic divisions in the graph.
Message Edited by Roberto Bozzolo on 11-03-2008 06:11 PM


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,173 Views)

Hi

 

Ok, sorry but I don´t understand the "controlAttribute integer". What should I choose to make my graph bigger?

 

I have to choose  one of the following:

 

http://zone.ni.com/reference/en-XX/help/370051H-01/cvi/cvilist_of_control_attributes/

 

 

BR

Benajmin

  

 

0 Kudos
Message 3 of 5
(3,166 Views)
Solution
Accepted by topic author bandersen

ControAttribute parameter specifies which attribute you want to set. In your case you must call SetCtrlAttribute twice: one time with ATTR_WIDTH attribute, the other with ATTR_HEIGHT.

Dimensions are expressed in pixels.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(3,156 Views)
Great that worked. Thanks alot for the help 🙂
 
BR
Benjamin
Message Edited by bandersen on 11-04-2008 06:27 AM
0 Kudos
Message 5 of 5
(3,132 Views)