DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Origin Position in a 2D Axis

Hi,
 
I have created a 2D Axis with grids and have set the scaling of the Axis to Manual, so that they shift according to the maximum and minimum values in the channel with a specific tick position. My problem is to display few values(Text) above and below the origin in the 2DAxis. Since the origin keeps shifting based on the channel and its values I am not able to get a hold on it. Is there a possibilty to get the origin position, so that once I get the position I can set the position for the text object to appear. Can anyone let me know about this?
 
Thanks,
Priya
0 Kudos
Message 1 of 3
(2,899 Views)
Hi Priya,
 
I don't know of a way to query out the origin position, but I do have a low-tech solution that should work fine for your described scenario.  I'm assuming that regardless of the floating limits on your automatically scaled X and Y axes that your origin is always at (0,0) or some other constant (X,Y) value.  If this is the case, then you can create 3 new channels in the Data Portal (I created them in a separate group) which contain that (X,Y) information.  Then create 2 additional curves on your 2D axis of type "Line and symbol" with a blank color.  You need 2 curves because you will get 1 symbol for each curve, and you want to display text both above and below the origin.  Then configure the text and its display for each curve, and now those texts will always be displayed relative to the origin, no matter what the automatic scaling does to the start and stop values of each axis.
 
See the attached example,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,891 Views)
Thanks Brad, I will try your solution and get back on any issues 🙂
0 Kudos
Message 3 of 3
(2,866 Views)