06-28-2019 04:00 AM
Hi everybody,
for my application i need to display values in a specific matrix pattern. To make it look better only the bars that actually get a value are supposed to be plotted. For this purpose i write NaN into every matrix entry where i dont want to see anything. Unfortunately the first column of the matrix is plotted anyway although the top and bottom 4 values have NaN in their entries. I guess it has something to do with this being the first column of the matrix. i couldn't find a solution to make these entries go blank and hope someone here has some kind of idea for it. Please look at the screenshot for clarification.
Thanks for the help!
06-28-2019 06:27 AM
The screenshot seems to validate what you're saying.
The problem is probably somewhere in the code you didn't post...
06-28-2019 07:48 AM
This subvi gets as input the Placementnumber on where in the 3D bar graph i want to place my measurements (the other input). Always one bar in each sector of the matrix will change with one update of the loop this subvi is in. If you look closely you will see that the NaN values in the corners of each sector will never change because they wont get accessed after the initialisation. The output matrix "all sectors" goes straight into plot helper which goes straight into the 3D bar graph.
So basically i dont do anything special to the NaN values. I tried to do the same in the labview examples for the 3D Bar Graph and the result is the same. Setting the first column to NaN won't blank them out while doing the same to any other column will result into a blank space.
Thanks for looking into it!
06-28-2019 08:08 AM
It would be easier for us if you posted the Vi with 3D bar graph with a constant with the NaNs. The problem seems to be there, and that would hive us immediately reproducibility if I understand you correctly.
The 3D bar graph does come with a lot of options, and it would be a hassle for us to make this Vi from scratch. Maybe it would not even reproduce the problem...
All I can say about this VI is that it seems to be 4X the same thing with different constants. So calling the same (new) SubVI 4X seems logical. Maybe even in a 4X for loop for the repetition.
06-28-2019 08:45 AM
Thanks for the fast reply!
I guess i have overcomplicated the issue by using my vi as an example for my problem.
I recreated the problem in the labview example for the 3D bar graph (see attachment).
As you can see all NaN values that are not in the first column of the 3x5 matrix will not be drawn in the 3d graph (desired behavior). But it seems that the NaN values in the first column maybe get set to zero and therefore are drawn which i do not want.
07-01-2019 02:08 AM - edited 07-01-2019 02:24 AM
That helps. It would make an excellent bug report.
The bug is actually a bit more serious. My idea was to simply remove the first column, and specify the Y values starting at 1. That would effectively remove the first column.
It seems however, that every NaN in the data, is rendered at the first column!
In short, having 'no value' doesn't seem to be supported by the bar chart...
As for a solution... I think the best chance is to create a child class of the bar graph. It's in "vi.lib\Math Plots\3D Math Plots\3D Bar\3D Bar Datatype\". Then, you should be able to overwrite "Calculate Plot Range.vi" and\or "Calculate Vertex Array.vi". Either save them as copies, or call parent method and modify the results. That should work, theoretically.
Let me know if you want to try that yourself, or if you need help. Sure sounds like a fun hacking project.