Jump to content

Merging graph legends or selectively hiding legends.


Recommended Posts

Hi All,


I'm not sure if what I need is even possible in LabVIEW. As you can see in the pic, I have a scatter and fitted data presenting in the graph. What I really need is a way to show only legend for one since they are coupled and not independent. I was thinking it is possible either by somehow combining them or turning off the legends for one but so far, I have not been successful. I was wondering is there a way to achieve that?

 

Cheers,

 

Fitting Graph_LV.png

Link to comment

For individual characteristic such as color you are better off with what you have.  But if you want to have a global setting for all plots such as point size, Show/hide, etc. you can hide the legend and create your own control.

  • You can programmatically iterate thru all your plots and change each plots feature based on your own UI control. 

image.png.8fffb37956cc0ec11ca5602a45d9e1de.png

Link to comment

Hi Sam,

I understand what you say and that exactly how I generate my graph (I programmatically assign colour line style point style and legend label). The problem is this graph is a combination of two sets of plots: As I said, scatter plot (points) and fitted (lines) plots. In other words, every two plots belong to the same data. Problem is that I cannot find a way to only show one legend for both plots or away to combine the two plots and show as one plot group. Also, visible apply to plots not the legend for that plot. My question is if there is a way to hide every second legend (not plot) and only the legend. I have tried the legend properties, but the visible property is applied to the whole legend rather than my specified plot legend.

 

Cheers,

MM

 

Link to comment

You would have to add a dummy graph that you would only show the legend of and fill that with half of your plot names (e.g. adding one empty plot for each pair).

And of course hide the legend of your original graph.

And respond to actions on the dummy graph to update your original graph.

Link to comment
16 minutes ago, X___ said:

You would have to add a dummy graph that you would only show the legend of and fill that with half of your plot names (e.g. adding one empty plot for each pair).

And of course hide the legend of your original graph.

And respond to actions on the dummy graph to update your original graph.

Hi X__,

I am not quite sure I understand dummy graph. Do you mean the graph is going to be nit visible?

and I use that only for the legend?

Cheers
 

Link to comment

Reorder the plots so that first you have the all the fitted data plots and then the scatters with the same color, then rollup the legend size and you only see the fitted data plots but the others are still there, but hidden

 

image.png.ecead5d8959e01940524959d094a7f03.png

 

image.png.84ce6e60c4d667ab2741d67c494d0de6.png

 

image.png.02117b1dceca80435c2584bc5a042807.png

 

Link to comment

HI BramJ,

 

thank you for the solution, tut that would not work for what I need, as you see I had to add a separate one and off for my plots that is used to select the selected plots for further calculations. I wanted to replace this Booleans with the plot is visible on legend and use that property in its place.

Wich in you solution is a little (programmatically) more work that it is worth.

 

Cheers,

MM

Link to comment

If you don't want the user to change plot styles/point styles etc, only the color and the label, than you could also use an array of clusters with the color, label and visibility settings. Or anything else you want, like highlighting one or more curves (thicker line).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.