mje Posted January 5, 2011 Report Share Posted January 5, 2011 Something that has always stumped me in LabVIEW is displaying discontinuous ranges in XY Graphs. Is there a way to do this? For example, the top plot shows a single graph with two plots. Displaying them as-is results in a whole bunch of empty space. Not only is it ugly, it makes the graph next to useless because you can't see any fine detail in each range. Now for the bottom graph I cheated a little and actually made two graphs, placing them next to one another. This works fine if you can know at design time how many graphs you'll need (which I don't). The other way I've handled this is by normalizing, scaling and offsetting each range such that they do display continuously, then hiding the axis from the user so they don't see the transformed coordinates. However this time I sort of need the axis in the original coordinate space to appear. Is this even possible using the stock XY Graphs? Quote Link to comment
hooovahh Posted January 5, 2011 Report Share Posted January 5, 2011 The obvious answer is to use 2 graphs, but to use that answer you'd have to know what kind of signal you are expecting and where the discontinuity should occur. I love LabVIEW's built in graph functions, for zooming and moving around so for alot of users I'd just expect them to zoom in on the parts of the graph they care about. Of course if this data is coming in, in real time this doesn't seem like a good option. I understand that they need to be able to take a look quickly and understand the information. Quote Link to comment
ned Posted January 5, 2011 Report Share Posted January 5, 2011 The obvious answer is to use 2 graphs, but to use that answer you'd have to know what kind of signal you are expecting and where the discontinuity should occur. I would have said the obvious answer is to use 2 different X axes, then set the ranges so the data appears where you want it. Quote Link to comment
mje Posted January 5, 2011 Author Report Share Posted January 5, 2011 Yes, but the caveat is I won't always need 2 ranges. It can be 1, 2, 5, or 3, for three is the holy number... Well in reality, it can be 4 as well. And maybe occasionally 6. Well you get the idea. I would have said the obvious answer is to use 2 different X axes, then set the ranges so the data appears where you want it. Can you do this? And still have the axes show on the plots such that the ranges are editable? Quote Link to comment
ned Posted January 6, 2011 Report Share Posted January 6, 2011 Can you do this? And still have the axes show on the plots such that the ranges are editable? Yes (I've only done it with Y axes, but I assume it's the same for X). Right-click on the X scale and choose Duplicate Scale. It's not particularly pretty, and a bit hard to tell which axis is which (for two, you can move one to the top of the graph to separate them), but it should work. In the graph properties you can set which X and Y scale will be used by each plot, and there must be a way to set that through property nodes as well. Each axis will always take up the full width of the graph, so you won't get exactly the effect you want, but it will be close. Quote Link to comment
jdunham Posted January 6, 2011 Report Share Posted January 6, 2011 (edited) Seems like it would be easier to use several graphs, hide all the Y axes except for the first, and use user events to keep the plots on the same Y scale. If you were insane, and had nothing better to do for the rest of the month, you could make it into a sweet XControl. Depending on how many traces you need to display, you can hide some of the graphs and recompute the others' widths to fill the plot area. Edited January 6, 2011 by jdunham 1 Quote Link to comment
Ryan Podsim Posted January 6, 2011 Report Share Posted January 6, 2011 Another option would be to use the Picture plot functions. That would enable to you as many graphs as you want. It would a little more complex on the coding side and you do loose the zoom and pan functionality on the built in graphs. 1 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.