Mahbod Morshedi Posted April 3, 2023 Report Share Posted April 3, 2023 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, Quote Link to comment
sam Posted April 3, 2023 Report Share Posted April 3, 2023 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. Quote Link to comment
Mahbod Morshedi Posted April 4, 2023 Author Report Share Posted April 4, 2023 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 Quote Link to comment
X___ Posted April 4, 2023 Report Share Posted April 4, 2023 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. Quote Link to comment
Mahbod Morshedi Posted April 4, 2023 Author Report Share Posted April 4, 2023 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 Quote Link to comment
BramJ Posted April 4, 2023 Report Share Posted April 4, 2023 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 Quote Link to comment
X___ Posted April 4, 2023 Report Share Posted April 4, 2023 14 hours ago, Mahbod Morshedi said: 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 Yes Quote Link to comment
Mahbod Morshedi Posted April 4, 2023 Author Report Share Posted April 4, 2023 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 Quote Link to comment
Mahbod Morshedi Posted April 4, 2023 Author Report Share Posted April 4, 2023 6 hours ago, X___ said: Yes Thank you I will give it try and see if it is working and the right solution. MM 1 Quote Link to comment
Mahbod Morshedi Posted April 6, 2023 Author Report Share Posted April 6, 2023 On 4/5/2023 at 8:43 AM, Mahbod Morshedi said: Thank you I will give it try and see if it is working and the right solution. MM Well. I'm not sure if this was the best way but it is working perfectly thank you again. Quote Link to comment
Lipko Posted April 6, 2023 Report Share Posted April 6, 2023 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). Quote Link to comment
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.