Jump to content

Stacking Multiple Plots


Cat

Recommended Posts

A looong time ago (2001?) when I was designing a GUI I needed to be able to show from 1 to 4 waveform charts on 1 screen, in separate plots. If there was 1 plot, there was 1 big chart, if there were 2 plots, there were 2 narrow horizontal charts, and if there were 3 or 4 plots, they were each in 1 quadrant of the screen. To make it even more fun there are two different sets of plots (the other is an XY graph) I need to do this for.

At that time my intention was to stack all those plots on top of each other and make them visible/invisible as needed. This had a tendency to crash my computer. There was some issue with LV back then about stacking lots of stuff on top of each other and manipulating it in that way. So what I did was instead of making an unneeded plot invisible, I moved it to another (hidden) part of the FP. When I needed it again, I moved it back to the right place and resized it according to how many plots there were. While painful, this has worked okay.

Flash forward to 2010... my Users now want to be able to resize their windows on-the-fly. While LV does allow one to "Scale Object with Pane" for selected objects, it unfortunately gets very confused when those objects are off on some other part of the FP. Not that I am surprised or would expect otherwise.

Since my current layout doesn't work, I've been revisiting the stack-and-hide concept. This seems to work better with the resizing, as long as you don't get too wild with it.

My question for you all is -- have any of you tried this with recent versions of LV? I will have somewhere in the neighborhood of 19 plots stacked on top of each other. This is going to take some major recoding, so before I head down this way I thought I'd check around here and see if anyone had any experiences with doing this.

Cat

Link to comment

A looong time ago (2001?) when I was designing a GUI I needed to be able to show from 1 to 4 waveform charts on 1 screen, in separate plots. If there was 1 plot, there was 1 big chart, if there were 2 plots, there were 2 narrow horizontal charts, and if there were 3 or 4 plots, they were each in 1 quadrant of the screen. To make it even more fun there are two different sets of plots (the other is an XY graph) I need to do this for.

At that time my intention was to stack all those plots on top of each other and make them visible/invisible as needed. This had a tendency to crash my computer. There was some issue with LV back then about stacking lots of stuff on top of each other and manipulating it in that way. So what I did was instead of making an unneeded plot invisible, I moved it to another (hidden) part of the FP. When I needed it again, I moved it back to the right place and resized it according to how many plots there were. While painful, this has worked okay.

Flash forward to 2010... my Users now want to be able to resize their windows on-the-fly. While LV does allow one to "Scale Object with Pane" for selected objects, it unfortunately gets very confused when those objects are off on some other part of the FP. Not that I am surprised or would expect otherwise.

Since my current layout doesn't work, I've been revisiting the stack-and-hide concept. This seems to work better with the resizing, as long as you don't get too wild with it.

My question for you all is -- have any of you tried this with recent versions of LV? I will have somewhere in the neighborhood of 19 plots stacked on top of each other. This is going to take some major recoding, so before I head down this way I thought I'd check around here and see if anyone had any experiences with doing this.

Cat

I have a set of sub-VI that let me realize "un-dockable" regions of the GUI. see reply # 18 in this thread.

http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=351512#M351512

The customer I developed this code for was very happy with the effect since it lets them expand what they wanted and ignore what did not matter.

Ben

  • Like 2
Link to comment

Is there a reason you haven't tried the tabbed approach? Where tab 1 has just one graph, tab 2 has two graphs, tab 3 has three, up to the number you want. Then color the tab to be transparent (so the user doesn't know it is a tab) and then control which tab the operator sees.

That being said I've never had the "Scale FP objects" work properly for very long. Usually I could resize once and it would be okay, then I would scale it back to where it was and every thing would be moved around slightly, and alignments between objects would fail. Maybe grouping them would have helped.

Link to comment

Is there a reason you haven't tried the tabbed approach? Where tab 1 has just one graph, tab 2 has two graphs, tab 3 has three, up to the number you want. Then color the tab to be transparent (so the user doesn't know it is a tab) and then control which tab the operator sees.

That being said I've never had the "Scale FP objects" work properly for very long. Usually I could resize once and it would be okay, then I would scale it back to where it was and every thing would be moved around slightly, and alignments between objects would fail. Maybe grouping them would have helped.

The "docking" approach I mentioned earlier works very well with the "Scale FP Objects" when I have only object in the Undocked panel.

Ben

Link to comment

Is there a reason you haven't tried the tabbed approach? Where tab 1 has just one graph, tab 2 has two graphs, tab 3 has three, up to the number you want. Then color the tab to be transparent (so the user doesn't know it is a tab) and then control which tab the operator sees.

Well, I have been playing with using tabs for the 3 main types of plots. The resizing of 1-4 plots on one page seems to work fine. Plus it's a nice fit programmatically. If I can't get the visible/invisible thing to work with 19 plots on 3 pages, I'll take a look at putting them all on their own page. Thanks for the idea!

That being said I've never had the "Scale FP objects" work properly for very long. Usually I could resize once and it would be okay, then I would scale it back to where it was and every thing would be moved around slightly, and alignments between objects would fail. Maybe grouping them would have helped.

Here's my little nugget I've learned about resizing: It works best if I only do it in either the horizontal or the vertical direction at one time. If I use the corner and do both at the same time, the FP objects get very misaligned very quickly.

I have a set of sub-VI that let me realize "un-dockable" regions of the GUI. see reply # 18 in this thread.

http://forums.ni.com...=351512#M351512

The other part of this challenge is that the Users also want another FP control (multicolumn listbox) to appear either to the side of the plots or below them. I've been thinking having some sort of floating window might be the best bet for that. Your approach looks very interesting. Thanks!

Link to comment
  • 1 month later...

I realized I should update this as opposed to taking over someone else's thread.

Resizing the multi-plots on the tab control worked great -- until I hit the run button. Resizing occurs differently in edit mode than it does in run mode. I tried variations on settings for quite some time before giving up. Also I don't know that if I'm going to take a performance hit from stacked plots, it really matters if those plots are stacked by themselves or in another page of a tab control.

As far as docking goes -- the User wasn't happy with changing the look of the GUI that much -- plus I told him it would take a little longer while I figured out how to manage resizing all those dockable parts. I will (hopefully) get a chance to use docking on floating window concept for channel selection.

So I'm back to stacking plots. Wish me luck...

Link to comment

I achieved an effect similar to what you are describing by placing all of my charts in an xcontrol with appropriate, draggable splitters. Each chart was set to "Fill Control to Pane" and then, as far as the top level VI was concerned there was only 1 control to resize (which seems to work MUCH nicer).

Link to comment

I achieved an effect similar to what you are describing by placing all of my charts in an xcontrol with appropriate, draggable splitters. Each chart was set to "Fill Control to Pane" and then, as far as the top level VI was concerned there was only 1 control to resize (which seems to work MUCH nicer).

This was kind of the effect I was hoping to have using tabs.

I haven't used xcontrols much since they first came out. If you don't mind, take a look at the first paragraph of my original post. I need to show either 1 chart OR 2 charts OR 3or4 charts at one time. The user can switch back and forth between 2 different types of those sets, with only 1 type at a time on the screen. And the 3rd set is two charts of different sizes. Can I do this automagically with xcontrols?

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.