NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Xiaogang
Posts: 23
0 Kudos

programmatically change x and Y axis to log scale

When a LabVIEW program is not running, right click the graph/chart/XY graph=(choose)=> Properties=(choose)=>Scales, we can set the X and Y axis to Log Scale.
 
However, if the program is running, can we create a control to let users to choose the axis to be normal scale or log scale?
....Users may need to use different axis scales especially when they analysis data from the graph.
 
 
 
 
Active Participant
CoastalMaineBird
Posts: 1,934
0 Kudos

Re: programmatically change x and Y axis to log scale

Assuming you have only ONE X-axis scale and ONE Y-axis scale, it's easy:

Use a property node for the graph, and choose the XSCALE : MAPPING MODE and YSCALE : MAPPING MODE properties: Set them to 0 for linear or 1 for logarithmic, based on some switch on the front panel.

If you have more than one scale, you'll have to set the ACTIVE SCALE to 0, set MAPPING MODE to whatever you like, set ACTIVE SCALE to 1, set MAPPING MODE to whatever you like, etc., etc.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Member
Xiaogang
Posts: 23
0 Kudos

Re: programmatically change x and Y axis to log scale

hi, CoastalMaineBird ,
thank you very much for your info.
i ve found the way to change axis scale with your help :smileyhappy
cheers

 
Active Participant
Hueter
Posts: 301
0 Kudos

Re: programmatically change x and Y axis to log scale