03-02-2023 04:09 PM
In my VI I programmatically set Plot.Name property of an XY Graph, which is supposed to show up in the legend. However when I start the VI, the legend does not show up (see below)
It does show up after the VI has run for some time (see below)
Also, it is chopped off. But that is a separate issue.
Is there a way to refresh the graph after I have set all the properties? Any suggestions on how I can fix this?
Girish
Solved! Go to Solution.
03-02-2023 05:00 PM - edited 03-02-2023 05:01 PM
Can you post the code you are using to set the plot names?
Also, just as a general thing, I've encountered glitches before when a plot name is a completely empty string. Can you set each of them to be a single "space" character before running, and see if that helps either or both of your problems (the updating delay or the chopped off plot)?
03-03-2023 04:00 AM
Select the Legend part, and in the Toolbar with the two semi circle arrows, select Bring to front.
03-03-2023 08:18 AM
I tried giving string of one blank and many blanks. That did not make a difference. When I gave a string of one blank, there was no noticeable difference in the legend. But when I gave a string of 12 blanks, a long empty legend showed up well after I started the VI, like when I gave real strings.
Unfortunately, I cannot send you the code where I set the graph properties because it is part of a large VI. The weird part is that all the other things I set programmatically, number of plots, the X and Y axis labels, Y min and max, show up correctly on the graph. It is the legend that does not get set. I do all the changes in one set of frames.