LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Swapping x and y axis in intensity graph

Solved!
Go to solution

Hello everyone,

I'm an intern in company that just started using LabView. Unfortunately there is no one I can ask about programming in it right now. I hope you could help me. I was told to show power spectrum of radio signal on intensity graph. My problem is that I should have time on y axis. Oldest time should be on the bottom and newest on the top of the graph. X axis is supposed to be frequency and Z axis of course power. I have read several post about this problem, but all of them where quite old so I hope that something has changed since then. I know I could swap axis using XY graph. But according to my knowledge I wouldn't have Z axis then. I have seen waterfall graph as well which I think should be perfect because my boss is calling what I should do a waterfall, but he says that it is not what he wants to get. I'm using LabView 2015 sp 1 32 bit with NI USRP-2954R. If anyone would like to see my problem I will add my simplified program.

Thanks in advance 🙂

0 Kudos
Message 1 of 5
(6,536 Views)

Hi Kirssika,

 

to swap axis on a intensity graph you need to transpose the Z array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(6,519 Views)

Your data is a 2-D array where X and Y are each dimension of the array, and the Z value is the value of the element in that array.  To swap X and Y, just use Transpose 2-D Array

 

In your situation, the 2-D array is just built from a 1-D array so you basically have a single row with X columns.  Transposing will give you a single column of X rows.  I don't know how well that shows up on your intensity graph.

 

EDIT:  Also be sure to use Block Diagram Cleanup on your VI.  You have a lot of overlapping wires and wires running backwards unnecessarily.

0 Kudos
Message 3 of 5
(6,515 Views)

Thanks for your replay! I have tried adding transpose array into my project. But I got really weird effect. My frequency is on the x axis as I wanted but it increases as it were time. Time on the other hand is on y axis and is from -250k to 250k. Z axis I think should be alright but it is shifted and I can see it only if I use hand tool from graph palette. I will try working on it. You gave me a big push ahead anyway. If you come with any idea I would be greatfull if you could share it with me.

Could you please tell me more about block diagram cleaning? For now I have been doing this manually or with clean up wire.

0 Kudos
Message 4 of 5
(6,480 Views)
Solution
Accepted by topic author Kirssika

I have found my answer here http://208.74.204.114/t5/LabVIEW/Change-direction-swap-axes-of-Intensity-Chart/td-p/3302983. Thanks for guiding me to the right direction.

0 Kudos
Message 5 of 5
(6,436 Views)