Jump to content

How to get number of rows in plot legend to match the numnber of


Recommended Posts

I'm sending data to a graph that could have a different number of plots depending on the user settings. I'm trying to get the plot legend to only show the number of plots that are present. I have the scrollbar turned on on the legend because the number of plots could be larger than will fit in the legend display. The number of rows in the legend doesn't change with the number of plots. How can I get the number of rows in the legend to match the number of plots? I've attached a VI that has the data and plot for an example.

Thanks,

George

Download File:post-2786-1206556679.vi

Link to comment

George,

Maybe I am missing something, but your example seems to me to do what you describe to be the desired behavior. If I delete an element of the data array, the number of rows in the legend decreases by one when I run the VI.... Isn't that what you want (good!) or do you need something else?

Paul

Link to comment

QUOTE (Paul_at_Lowell @ Mar 26 2008, 02:06 PM)

George,

Maybe I am missing something, but your example seems to me to do what you describe to be the desired behavior. If I delete an element of the data array, the number of rows in the legend decreases by one when I run the VI.... Isn't that what you want (good!) or do you need something else?

Paul

George,

Is

Property >>> Legend >>> Plots shown

What you are looking for?

Paul,

Is

Property >>> Autosize Legend

True?

Ben

Link to comment

QUOTE (neB @ Mar 26 2008, 12:16 PM)

Paul,

Is

Property >>> Autosize Legend

True?

Ben

Not with a property nodes. Right-clicking on the graph and checking or unchecking Auto Size Plot Legend doesn't change the behavior for this particular example.

Paul

Link to comment

QUOTE (Paul_at_Lowell @ Mar 26 2008, 02:42 PM)

Not with a property nodes. Right-clicking on the graph and checking or unchecking Auto Size Plot Legend doesn't change the behavior for this particular example.

Paul

I should have mentioned that property was from LV 7.1. They re-arranged a lot of the legend and cursor stuff in LV 8+.

My Bad.

Ben

Link to comment

QUOTE (Paul_at_Lowell @ Mar 26 2008, 02:06 PM)

George,

Maybe I am missing something, but your example seems to me to do what you describe to be the desired behavior. If I delete an element of the data array, the number of rows in the legend decreases by one when I run the VI.... Isn't that what you want (good!) or do you need something else?

Paul

Well that's part of what I want. If you scroll down the plot legend you'll see that there are extra entries there.The problem is that I need the scrollbar there for those cases where there are more plots than will fit on a screen sized plot legend (29 entries in my case). If I only had a max of 29 possible curves, then I could limit the number of rows and do away with the scroolbar and everything would be hunky-dory.

On the other hand - practically speaking - trying to figure out which curve is which when there are more than 29 is pretty difficult. But it still bugs me that the number of legend entries is too big.

George

Link to comment

QUOTE (george seifert @ Mar 26 2008, 01:09 PM)

Well that's part of what I want. If you scroll down the plot legend you'll see that there are extra entries there.The problem is that I need the scrollbar there for those cases where there are more plots than will fit on a screen sized plot legend (29 entries in my case). If I only had a max of 29 possible curves, then I could limit the number of rows and do away with the scroolbar and everything would be hunky-dory.

On the other hand - practically speaking - trying to figure out which curve is which when there are more than 29 is pretty difficult. But it still bugs me that the number of legend entries is too big.

George

OK, I see the problem now. Yes, I would want different behavior, too. I don't know of a solution.

Link to comment
  • 1 month later...

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.