LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
needinfo

Provide method to delete plot names from all graphs, charts, etc.

Status: New

Currently on waveform graph, once a plot is named it cannot be deleted (it can be made blank, but it still shows in all pull downs).  For instance I plot 3 graphs, each having 16 plots.  I then refresh data and plot only on graph of 11 plots.  My new plot names show in the top of the pull downs, but all the previous plot names still show up as well (see attached screen shots).

Please expose a method to remove plot names (property to give array of existing names and property to remove name or all names).

 

18 Comments
nickbike
Member

Over 9 years later and still not implemented.

oscardupont@vernay.com
Member

Please solve the removal of the extra plot names in the XY graph!!!

 

Another related point is there is a legend.minimum size so why you can not create a legend.maximum size as well.

Steve_TDiode
Member

While Legend Plot Min removes the extra plots from the Graph Properties list, they still remain on the front panel cursor legend list for a cursor that is set to watch all plots.  

Those extra plot names in the cursor legend list can be removed by adding at least one new set of plot data (which contains fewer plots), then toggling the Cursor.WatchAllPlots property False, then True.

 

 

 

arob
Member

Really unbelievable that this has not been fixed

ErikL68
Member

This now works, but it's not an elegant solution.

I'd post a solution, but VIs aren't allowed for some reason on the Idea Exchange, so here's a Snippet:

 

Clear plot names.png

 

NOTE: I tried pulling down this snippet myself from the Preview for this post, and it didn't work. Somehow the file I pulled down is increased in size ~ 10K from the original Snippet file. If it doesn't work for you, just re-create the code. Note that the number 22 was the limit I had for the legend size and to trigger showing the scrollbar on the legend.

 

To see the issue, run it once with 40 plots until it shows a few points, then scroll down to the last legend entry and run it again but with 30 plots. You'll see that plots 31-40 are now gone from the Legend entirely.

Regards,
Erik

ErikL68
Member

Almost missed the issues people said about Waveform GRAPHS. Turns out there you don't set the History to an empty array, but instead set the VALUE to a 1-by-X array, where X is the # of plots. That fixed it for me.

 

As far as cursors - just clear the cursors by entering an empty array into the property "CursorList". Or perhaps iterate through the existing cursors and simple exclude any from the array that had the Plot removed. Sorry - I'm not very versed at using Waveform Graphs, but clearing the List parameter clears the Cursors if that's what you want done.

And as far as XY Graphs, start by setting the Value to an array of clusters of Plots where the array is the same size as the desired # of plots and the Plots arrays are empty. Here's what worked for me:

Clear plot names on XY Graph.png

Note I had it build plots where Y = X + a random number from 0 to 3, just as a check that I was creating them "right" - fortunately I was.

Hope this helps!
Regards,
Erik

Bas.v.E
Member

It's a shame NI never fixed this, but Erik Thanks for the quick fix. We've minimized your code to this:

BasvE_0-1653477714323.png

 

_Y_
Active Participant
Active Participant

@Bas.v.E wrote:

We've minimized your code to this:


Thank you. It works for Charts too

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP