How to Change Axis Name of Graph Control in LabWindows/CVI

By Ralph - Last updated: Tuesday, March 24, 2009 - Save & Share - Leave a Comment

We can use the SetCtrlAttribute function to change an Axis name programmatically in LabWindows/CVI. Just set the ATTR_XNAME or ATTR_YNAME attribute to any name you’d like to use in this function.

For example, change the top X-Axis name of a graph, we can use the following code.

// Make the top x-axis the active one
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_ACTIVE_XAXIS, VAL_TOP_XAXIS);    
// Set the name
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_XNAME, "Axis Changed");

Related posts:

  1. The Difference Between Chart and Graph in LabVIEW We can use chart and graph to display our acquired...
  2. How to Create a Programmatically Changed Text Label In LabVIEW In LabWindows/CVI, we can create a free label text control...

Posted in LabWindows/CVI, VI Software • Tags: , , Top Of Page

Write a comment