LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set color of left y-axis and right y-axis separately?

I have an XY graph with two dataplots. One plot corresponds to the left y-axis and the other to the right y-axis. The plot corresponding to the right y-axis is blue. I'd like to set the color of the right y-axis labels and tick marks to blue to match the dataplot. Is this possible? So far I have only been able to change the axis name for all axis using:
     
  SetCtrlAttribute (panelHandle,       graphCtrl,  ATTR_XYNAME_COLOR,  VAL_BLUE);
 
It would be nice if the color attribute could be set for the Active axis only. Any ideas?
 
Thanks,
 
Ryan
0 Kudos
Message 1 of 3
(3,021 Views)
The easiest method I can imagine to meet your needs is to use two different graphs: the primary graph on which to plot your curves, with the appropriate colors for the left y-axis labels and the right y-axis set as range but with no labels shown; the second used only to display the right y-axis, placed below the first one and drawn on trasparent colors or with all elements hidden except the axis labels, painted with a color conguent with plot color.


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 3
(3,015 Views)

Thanks for the reply. I think I'll just use the legend to indicate the plot.

 

-Ryan

0 Kudos
Message 3 of 3
(3,005 Views)