11-25-2022 07:48 AM
Hello CVI community,
I would like to do a graph like you can see on the attached picture.
What kind of graph control should I use ?
Thanks for your help.
Alain
11-28-2022 06:28 AM
Hello Alain,
there's no direct polar plot in CVI. So you'd have to:
- convert your polar data to cartesian
- use a 2D plot of intensity with PlotScaledIntensity along axes Freq(X) and Freq(Y)
- use a transparency color in your list of ColorMapEntry colors
- overlay your polar grid as a series of PlotLine, PlotArc and PlotText.
Overall it's about 10 lines of code.
11-30-2022 09:18 AM
Hello Guillaume,
Thank you for your answer.
It seems to be more difficult. I have an array of 40 frequency and 72 values of variance per frequency, corresponding to the directions (resolution of 5°) :
Freq./Dir.; 0.0; 5.0; 10.0; 15.0; 20.0; 25.0; 30.0; 35.0; 40.0; 45.0; 50.0; 55.0; 60.0; 65.0; 70.0; 75.0; 80.0; 85.0; 90.0; ...
0.0250000;0.4274E-03;0.4464E-03;0.4759E-03;0.5160E-03;0.5674E-03;0.6302E-03;0.7042E-03;0.7884E-03;0.8806E-03;0.9773E-03; ...
0.0273690;0.4321E-03;0.4526E-03;0.4841E-03;0.5269E-03;0.5817E-03;0.6488E-03;0.7279E-03;0.8179E-03;0.9163E-03;02;02; ...
0.0298970;0.3778E-03;0.4053E-03;0.4459E-03;0.5011E-03;0.5727E-03;0.6623E-03;0.7709E-03;0.8981E-03;0.1042E-02;0.1196E-02; ...
0.0325890;0.3648E-03;0.3963E-03;0.4425E-03;0.5058E-03;0.5887E-03;0.6938E-03;0.8232E-03;0.9773E-03;0.1154E-02;0.1346E-02; ...
0.0354540;0.3715E-03;0.4063E-03;0.4573E-03;0.5272E-03;0.6195E-03;0.7374E-03;0.8836E-03;0.1059E-02;0.1261E-02;0.1483E-02;...
.
.
.
I don't really understand how to deal with these data and use it with PlotScaledIntensity. If I do a polar to cartesian conversion, I'll get 2 array of 72 values for each frequency. How to use the intensity plot with that ?
Can you give me more explanation ?
Thanks
Alain
12-01-2022 07:45 AM
If I understand you denomination properly, you have 360/5=72 angles and 40 radial positions. And for each of those you associate an intensity value ?
So you do a 2D array: double Array[NB][NB]; with NB between 80 and 160, and you do a cartesian conversion.
I couldn't find a PlotIntensity example in the CVI examples, but here's one for instance:
https://forums.ni.com/t5/LabWindows-CVI/PlotScaledIntensity-and-NAN-values/td-p/2159776
12-05-2022 12:40 AM
Hello
I think that the easiest way is to do it with canvas control & to draw it yourself
12-05-2022 02:36 AM
Hello,
Thanks a lot for your answers.
I think that it's possible to use intensity plot. I must adapt the data in order to have a matrix 100x100 for example (the actual matrix is 40x72).
I will have a look to the canvas possibility too.