Jump to content

2 plots stacked in 1 chart with 3 traces each?

Recommended Posts

Granted that I could do this very thing with two single-stack charts of 3 traces each. I could do that... However...

What I'd very much prefer is to have 1 chart with 2 stacks and 3 traces on each.

So my question is...Can I do that? And if so, how can I do that?

I'll tell you what this is for...

I have a test stand measuring pressure and flow. I want to show the current value for each in a separate, vertically stacked plot, with also the current max and min limits as dotted red lines. The settings are progressive steps, each with a different max and min for both those values. I want the operator to not have to think, only just look at the cart, and to know in an instant if it is performing amiss. Also an aid to troubleshooting. Save me a lot of headaches and interruptions down the road.


Link to post

I don't think what you are asking is too difficult, but I'd rather see a picture of what you are trying to accomplish.  So I understand where the 6 lines come from, A Minimum, Maximum, and Value for two separate measurements.  But what are the 2 stacks?  I think this can be done pretty easily with an XY graph but I might be misunderstanding your needs.

Also keep in mind that the XY graph also has the ability to place static images on top, or behind graphs using the Plot Images property node.  With this you should be able to also overlay anything you might want on the graph that isn't immediately respectable with XY data.

  • Like 1
Link to post

So, to paint a picture...

In the TOP plot, three lines corresponding to Pressure in PSI:

  1. The ACTUAL pressure as a solid white line, read from a transducer.
  2. Above that (hopefully) a dashed red line corresponding to Do-Not-Exceed value for the present circumstance (a constant).
  3. Below that (hopefully) a dashed red line corresponding to Fall-Not-Below value (another constant).

In the BOTTOM plot, three lines corresponding to Mass Flow in PPH, and that with it's own set of three lines, like for above.

Now, the two plots are simultaneous, and of significantly different magnitudes, so that one would end up squished small if on the same Y axis.  Hence two plots.

Now also, the waveform chart would be zeroed out between changes of circumstance. That is to say, each circumstance would be one step in a staircase of values across the range, some very small, others quite large. Thus the tolerance for max & min, plus the value itself, would be squished down from auto-scaling once higher values passed through the view. So I break up the display into circumstances of one stair step each, with each lasting a minute or so.

Link to post

Thank you for that. However, it seems I explained poorly. So I beg pardon. I should have said, upper and lower "stack", each with 3 lines, both stacks on the same chart. This as opposed to needing two separate charts, thus to keep the two simultaneous. Two, because with auto-scale in Y on the same non-stacked chart, if PSI is in the hundreds while PPH is in the teens, the PPH will be sorely squished down.

Your otherwise very fine example is showing six lines in a non-stacked chart.

Playing around I somehow managed, quite accidentally, a 2-stack plot with one line above and two lines below. But I've no idea how that occurred and have not been able to reproduce it.

Edited by Gan Uesli Starling
More clarity
Link to post

I still don't know what you mean by upper and lower stack, is this a graphing term I should be familiar with?  Do you mean two separate Y scales?  Cause that can be done as well with one on the left and one on the right.  This was also why I asked for a picture since I wasn't sure what you were talking about.  Glad you seem to have something working or close to it.

  • Like 1
Link to post

Hmm... The Waveform Charts can display as "stacked plots". There is a checkbox for that in the front panel as an option. It is very like a digital oscilloscope, yes? And in my Yokogawa DL850 scope (and others) you can divide the screen into sections (or plots, stacks, whatever may be the most correct term). And in each of those sections (on the DL750 and others) you can have more than one trace. So, for instance, I could be viewing Temperature in one section, with all my temp data there, Pressure in another with my transducer data there, and Flow in another with all my coriolis meter outputs there. Similar types of data, in similar ranges, all nice and tidy. All on one device (for a scope). I was hoping for the Waveform chart to emulate this behavior.

But if need be, I can call separate Waveform charts, one for each type of data. It just seemed less tidy, plus a bit more bother for having to deal with plural references (versus one) to thread the controls down through sub-sub-sub-routines via cluster.

Sorry this is taking up so much of your time. It seemed a simple concept to start. Perhaps I was wrong.

Edited by Gan Uesli Starling
Link to post

OOOOhhh, yeah I've never used that feature but it seems to be a feature of the Waveform Chart and not the graph.


The good news is a Mixed Signal Graph can look and behave in a similar way.

Graph Test.png

Graph Test 2.vi

  • Like 2
Link to post

Join the conversation

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

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.

  • Similar Content

    • By Paul Liu
      Hi All,
      I am a new user to LabView and this is my first project using it. The project requires me to read a massive spreadsheet from Excel into LabView and then allowing the user to do the following:
      - Select which columns to plot against the first column
      - Use a cursor to select a portion of the spreadsheet: the Vi will then average the selected data by column (in other words, if the user selects data across multiple columns, the program will average data in each column separately). Then write the averages to the csv file.
      So far, I have the spreadsheet read into a table as strings (because the first row of the spreadsheet is words). I have spent a lot of time searching how to allow the user to select data on the table to perform operations on, but to no avail. I am hoping you guys could give me some insight on how to tackle this project.
    • By ijustlovemath
      I just recently had a need for XY chart functionality in my application. The example NI has on its website was a little too simple, as I needed support for multiple curves. I've attached the VI and some examples, would love to hear any critiques you have.
    • By Mirasoul
      I have one problem with delete one plot from the stack.
      Always when I turn off a buton(for example numer 1) I lost the last plot from the stack
      Is there any Chance to fix it?
      Nr.Chart - Value
      0 - 0
      1 - 1
      2 - 2
      3 - 3
      turn off buton 2nd, what stays?
      0 - 0
      1 - 1
      2 - 2
      thats so annoying...
    • By machyaer
      Hello to everybody,
      I'm wondering to find a solution to this problem...
      I have an xy-graph and I would like to insert programmatically some text label connected to certain x-y coordinates of the plot itself.
      Does somebody know if it is possible? ... and have an idea on how to implement such behaviour?
    • By hhtnwpu
      hi, I want to read and process large data(nearly 100 million rows,the file size over 500MB), the original format of the file is .txt, through rename as .dat we get the binary file. The attachment is my vi. When the file is larger than 1 million lines(the data is singal Column), there is a wrong with "the memory is full".I want to read the data and plot a graph in the time domain, on the graph I can see the detail by zoom tools; and then do some anlysis about FFT and Statistics .I don't know how to do decimation in chunks .another thing ,maybe the memory release is also important. can you help me? thanks!
      the data from a dynamic strain test,the sampling rate is 10K/s。if we can get the whole result use a little data decimation from a chunk ,when we zoom some detail, such as in one chunk, we can get the whole data on the graph without decimation?thanks!
      read data.vi
  • Create New...

Important Information

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