LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Unused Plots from Graph

I have a graph containing about 30 Plots (selectable by user). Now I want to remove some of them, so the user cannot select them from the legend.

Because of the number of plots there is a scrollbar on the legend, which makes it impossible to just hide them.

 

See the attached example. How to remove the three plots named Useless 1-3 and keep the other ones?

 

Thanks in advance

 

0 Kudos
Message 1 of 5
(6,853 Views)

Hi Madir,

 

I don't know if it is possible to delete programmatically some plots in the legend while keeping the values (maybe I'm wrong).

 

In following forum case, they resetted the graph in order to define programmately how many plots are displayed.

 

Delete plot definitions from chart - Discussion Forums
http://forums.ni.com/t5/LabVIEW/Delete-plot-definitions-from-chart/td-p/749266

 

I hope this can help you!

 

Marc

0 Kudos
Message 2 of 5
(6,787 Views)

Hello!

 

I have seen many similar questions before in this forum, and usually the final conclusion was that, it is much better to program your own Plot selector. Using a ring, or something which is convenient. You can just disable the graph legend or any other items as you wish, so the user cannot use the built-in feature(s) (Advanced -> Run time shortcut menu -> Edit).

 

And using the programmed "curve selector", you programmatically change what the user can see...

 

EDIT:

or if you just want to permanently delete these Plots, just take the data, and delete those part of your data which belongs to those Plots. You reload your graph again with the decreased size of data, and that is all. Of course, probably you have to play a bit with the Plot legend names, depending on your needs, but it is easy using the property nodes...

 

 

 

 

Message 3 of 5
(6,776 Views)

Hello Madir123,

 

I believe you or sombody else already resolved this issue, since it's been posted last year.

I encountered same issue today, chart or graph look like they hold the max buffer size consistent with they've got before.

One tedious way might be to delete it and recreate it by putting all the natures we did, but not recommended.

The attachment is what I did,

1) Select active plot from property node,

2) Make it invisible,

But, I'm still not 100% satisfied.

 

Did you find ultimate nature of char/graph and how to change it?

 

Thanks,

0 Kudos
Message 4 of 5
(6,537 Views)

I think I have finally solved this problem that has vexxed people, including me, for years!  (note the other thread from 2008).

 

Under LV2013, I had precisely the same problem as described many times before.  I had old plots that I could not get rid of in the legend.  No combinations of "ReInit to Default", or removing the names of the other plots, or setting all plots to be invisible, etc, would work.

 

Until I found this property:  Legend.Plot Minimum (LegPlotMin).

 

When I read it from my XYGraph, I got a number of 60, which was precisely the number it always showed, regardless of data in the graph.

 

So now, in my initialziation, I write to it with the number of plots I'm going to have.  And bingo, it works perfectly!

 

 

I'm not sure if this will do the trick for others, but it worked for me-- glad to give more information if I can help any one else out there!

 

 

Message 5 of 5
(6,246 Views)