Acetone Posted August 31, 2021 Share Posted August 31, 2021 I have set up a sequence, activated by a button, that records transistor characteristic curves - multiple traces are created dynamically, complete with legend, specifying conditions for each trace. The button is the only control I use, so the sequence has a DeleteAllTraces() at its beginning, to clear the graph area at the beginning of the next experiment. The traces are removed, however, the legends remain until the first new trace appears (it is not drawn in real-time; I collect the data in an array for each trace, so that I can delete the channel history before each new trace, so there's about a minute or so with the empty graph and the "old" trace labels above it). Is there a way to clear the legend as well, so that each experiment run begins with a completely empty graph? It should be noted that since the traces are created dynamically, the variable that I use for their names stores only the most recent one at the end of a run. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted September 1, 2021 Share Posted September 1, 2021 So the issue is that the legend doesn't clear out until new traces are added with data? You'd probably have to trick it by adding a trace that doesn't have a legend, waiting for a paint cycle, then deleting that trace. Basically since there is no valid data to plot, it isn't redrawing the graph. Once you give it some valid data it redraws. Why not just leave the traces in place? Or create some fixed number and only use some of them, clearing out the legend of the rest? Or just create your own legend and don't use the one built into the graph control. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.