08-07-2024 10:17 AM
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.
08-07-2024 11:33 AM
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.
08-07-2024 12:08 PM
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:
(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.)
08-07-2024 12:26 PM
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.
08-07-2024 02:31 PM
You can try using Picture plot, but it will take a lot of work.
08-08-2024 02:33 AM
08-08-2024 05:35 AM
@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.
08-08-2024 06:25 AM
@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.
08-08-2024 06:46 AM
@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.
08-08-2024 03:49 PM
you can make plots transparent and then overly one on top of the other, one for each file.