LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to plot Audiometry Graph

Hello,

I'm working on a SubVI that takes X and Y coordinate points and an image symbol as inputs. The goal is to output an XY Audiogram Graph with the symbols displayed at the specified XY coordinates. Could anyone guide me on how to achieve this in LabVIEW. 

 

I tried with XY Graph with adding annotation but it is just adding Text based Annotation but no facility to add image symbols.

 

X is Frequency and Y is Sound Intensity in dB. 

 

Please find the attached sample graphs and image symbols.

 

   

Audiometry Symbols.png

Audiometry Graph Right.png

Audiometry Graphs Left.png

0 Kudos
Message 1 of 10
(460 Views)

It would be easier to use an image-based graphing library instead of trying to force fit this into LabVIEW's graphs.

 

https://advancedplotting.github.io/ is an option.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 10
(445 Views)

LabVIEW plots natively support different styles for the "ticks", but I'm not sure you can have multiple tick types per plot.

 

To do what you're after, you'll need to make duplicate plots. I'd recommend one "base" plot with no tick markers and one additional plot per tick marker type. Those plots would have no lines between them.

 

It's a bit convoluted, but it's either that or use a different toolkit. Here's a quick mockup:

 

Example_VI.png

 

(Very quick and dirty, I was trying to squeak this in before a meeting. In a real project, you'd want to make this automatic in a subVI, and would need to dynamically create different plots for each shape since you said you wanted to specify each image.)

Message 3 of 10
(436 Views)

You can also leverage the Python package https://github.com/HamiltonLabUT/audiometry in LabVIEW to keep your efforts low.

 

Or this is a good sign to create a Audiometry library for LabVIEW.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 10
(428 Views)

You can try using Picture plot, but it will take a lot  of work. 

0 Kudos
Message 5 of 10
(416 Views)

Or you could combine your XY graph with plot images (back, front, middle)!

Needs also some effort, but maybe less than creating the whole plot in the 2DPictureIndicator…

Best regards,
GerdW


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

@GerdW wrote:

Or you could combine your XY graph with plot images (back, front, middle)!


If doing it fully in LV, I expect that's what I would do too. Note that this is a property of the graph control.

 

Also note that the graph has methods for converting from graph coordinates to pixel coordinates, which you will need in order to know where to draw your markings. I believe the relevant method returns pane coordinates, so you will also need to use the graph property for the graph position to find the correct position.


___________________
Try to take over the world!
0 Kudos
Message 7 of 10
(378 Views)

@GerdW

Can you please provide some example.
I tried but its only working for one image one plot. Unable to add multiple images in a single XY plot. 

0 Kudos
Message 8 of 10
(372 Views)

@atul_ghumade wrote:

@GerdW

Can you please provide some example.
I tried but its only working for one image one plot. Unable to add multiple images in a single XY plot. 


You can have three pictures for the graph, but you only need one of them. You can use the picture control VIs to build a single picture with multiple elements and then set that as the picture for the graph.


___________________
Try to take over the world!
0 Kudos
Message 9 of 10
(366 Views)

you can make plots transparent and then overly one on top of the other, one for each file. 

 

Message 10 of 10
(337 Views)