LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display a Closed Polygon Shape in XY Graph (Like Mode Shape Visualization)

Hello everyone,
I’m currently working on visualizing FFT/FRF results in an XY Graph in LabVIEW.

At the moment, I can only plot one data point per plot, which results in separate, unconnected points like this:

![Individual points in XY graph](first image)

What I’m trying to achieve is a visualization like this — a closed polygon where each point is connected and color represents the amplitude or phase (similar to a mode shape representation):

![Closed polygon mode shape](second image

I would like to ask:

  1. How can I connect individual XY points from multiple plots into one closed shape or polygon?

  2. Is it possible to apply color gradients to the lines based on amplitude (or another parameter)?

I’ve tried using multiple plots in an XY Graph, but they only show individual dots, not a connected shape.

Any advice or examples would be greatly appreciated. Thank you in advance!

Download All
0 Kudos
Message 1 of 6
(493 Views)

You can map the data into an intensity graph.

 

See the links to my examples in this old post.

 

(Or you can use a 2D picture with some more coding)

0 Kudos
Message 2 of 6
(476 Views)

Do you have example vi for implementation using 2D picture?

 

0 Kudos
Message 3 of 6
(436 Views)

@farhannmhd wrote:

Do you have example vi for implementation using 2D picture?


Are you interested in learning LabVIEW?  If so, I recommend doing a Web search for "LabVIEW 2d picture" and trying to learn from several videos and NI Web sites.  If you are a student taking a LabVIEW class, talk to your fellow students, or your instructor.  If you want us to look at your code, please "Save for Previous Version" and choose LabVIEW 2021, which most experienced LabVIEW developers on the Forum can open.

 

Bob Schor 

 

0 Kudos
Message 4 of 6
(417 Views)

@Bob_Schor wrote:
, please "Save for Previous Version" and choose LabVIEW 2021...

Many prefer 2020 or even 2019...

0 Kudos
Message 5 of 6
(408 Views)

@farhannmhd wrote:

I would like to ask:

  1. How can I connect individual XY points from multiple plots into one closed shape or polygon?

  2. Is it possible to apply color gradients to the lines based on amplitude (or another parameter)?

I’ve tried using multiple plots in an XY Graph, but they only show individual dots, not a connected shape.

Any advice or examples would be greatly appreciated. Thank you in advance!


 

For problem #1, you can do one additional plot that contains all data sorted correctly, and with a copy of the first point appended to the end (to close the curve) showing only as line. Now you have all colored points from the various plots and a line (probably in a different color) connecting them all.

 

For problem #2, I already gave you several solutions using an intensity graph. Did you look at the linked examples?

 

A 2D picture is just a canvas where you have full control over every single pixel. Here is a recent example where I draw colored shapes, but you really can do whatever you want.

 

0 Kudos
Message 6 of 6
(405 Views)