LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph with broken (or segmented) X axis

Solved!
Go to solution

Hi all,

 

I would like to realize the a plotting with a "broken" X axis. By broken axis, I mean not continuous. Indeed, instead of having data starting from 10 to 100 with a continuous increment, I have data starting from 0 to 20 and then data from 90 to 100.

 

I guess there are 2 solutions to do that. The first one is to still use an X scale starting at 10 and finishing at 100 with data displayed only between 10 and 20 and 90 and 100. The second one would be to have a real "broken" axis, that is to say an axis on the range 10-20 and then 90-100 with some kind of seperation between the 2 parts (like it is possible to do with Excel).

 

So far, I have done something which is close to the first solution. I start by setting the X axis to be between 10 and 100. Then the first measurement starts and data are plotted. However, when the second measurement starts (when the time is 90), the data are plotted between 10-20 erasing the first set of measurements.

 

 

Does any of you know if it is possible to do any of that withtout using multi graphs? See attached what I want to do. Hope that helps to understand.

 

Thank you.

 

PS: I wanted to post a vi to help with the explanation, but I don't know how to generate a "NULL" number (not 0).

0 Kudos
Message 1 of 18
(4,072 Views)

What data types are you working with? If you could post the section of code that gets you close to your first solution, it may give us a better idea of what you're working with.

0 Kudos
Message 2 of 18
(4,027 Views)

@MattWSU wrote:

Hi all,

 

I would like to realize the a plotting with a "broken" X axis. By broken axis, I mean not continuous. Indeed, instead of having data starting from 10 to 100 with a continuous increment, I have data starting from 0 to 20 and then data from 90 to 100.

 

I guess there are 2 solutions to do that. The first one is to still use an X scale starting at 10 and finishing at 100 with data displayed only between 10 and 20 and 90 and 100. The second one would be to have a real "broken" axis, that is to say an axis on the range 10-20 and then 90-100 with some kind of seperation between the 2 parts (like it is possible to do with Excel).

 

So far, I have done something which is close to the first solution. I start by setting the X axis to be between 10 and 100. Then the first measurement starts and data are plotted. However, when the second measurement starts (when the time is 90), the data are plotted between 10-20 erasing the first set of measurements.

 

 

Does any of you know if it is possible to do any of that withtout using multi graphs? See attached what I want to do. Hope that helps to understand.

 

Thank you.

 

PS: I wanted to post a vi to help with the explanation, but I don't know how to generate a "NULL" number (not 0).


 

See attached vi.  Many ways to do that, one method is by having multiple X-scales on XY graph and specifying different ranges on each of them. Just make one of the  scale invisible (right-clicking on any X-scale will show marker/etc options)

 

-DP

 

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 Kudos
Message 3 of 18
(4,024 Views)

If you enter NaN as a number, it will not be plotted,  Build an Array of NaN's (not a number by typing NaN in a double contstant.)  And place that array in between the 2 sections you want to show disconnected.

0 Kudos
Message 4 of 18
(4,012 Views)

Thank you all for your help. I think I'm getting close to understand what's going on.

 

First, see attached a screenshot of the part of my code as asked by _Tim. What it is currently doing is plotting "data" on a waveform chart. It is done this way in oder to plot different waveform acquired back to back on the same graph (see here for more information: http://forums.ni.com/t5/LabVIEW/How-create-a-multi-plot-graph-with-remanence/m-p/2455990).

 

So, right now, I'm using a waveform graph, that is why I could not figure out a way to get a "broken" axis. What you suggest BTC_admin makes total sense. So, if I understand correctly I can't use a waveform graph. Therefore, can I still do the graph with memory (see link above)?

 

To be precise, I would like to plot "data" vs "frequency" (see attached file) knowing that frequency goes from 10 to 20 and from 90 to 100, and data are acquired in real time. Also, I want to keep the ability of plotting many measurements on the same memory graph (like it is right now).

 

RavensFan, what you suggest is not the best for me since I want to avoid to display the frequencies for which there is no data. Basically the X axis would be between 10 and 20, and then from 90 to 100.

 

What I have tried following your answers was to use a regular XY graph. However, I could not figure out how to connect the wires correctly. I would always end up with broken wires. I'm no sure to fully understand how clusters of 1D or 2D, arrays of 1D or 2D can be connected to a graph...

 

 

Thanks for your time guys

0 Kudos
Message 5 of 18
(3,990 Views)

I think there is more issues with the design you have implemented (for example you're not connecting wire to the output side of the shift-register, not sure what you're doing on other cases of that structure).  However, I have attached another vi here, this will help you add as many plots as you want.  I have also made first X-scale range to 0~30 and second X-scale range to 70~100.  This shows first three graph on 0~10 range (you can figure out how to change that range from 10~20 Smiley Happy ) and then next three on 90~100 range.

 

Hope that helps...

 

-DP

 

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 Kudos
Message 6 of 18
(3,978 Views)

 

BTC_admin wrote:

for example you're not connecting wire to the output side of the shift-register, not sure what you're doing on other cases of that structure


 

My mistake. The wires got lost when I removed some parts of the code to make it simpler in order to post it. It is corrected now and uploaded below.

 

Also, the reason of these registers is because I want the data to be display into the loop (while the experiment is running) and not at the end of the measurement (after the loop) like it is realized in your program.

 

I'm still looking for a way to connect my wires correctly...

0 Kudos
Message 7 of 18
(3,963 Views)

Ah ok.  Try the connection I am showing in attached image (since I don't have your code, I have edited your image- might have been easier to edit the code):

 

debug.PNG

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 Kudos
Message 8 of 18
(3,957 Views)

@MattWSU wrote:

 

RavensFan, what you suggest is not the best for me since I want to avoid to display the frequencies for which there is no data. Basically the X axis would be between 10 and 20, and then from 90 to 100.

 



How do you know?  Did you try what I said?  See attached and tell me how it is different from what you want.

 

0 Kudos
Message 9 of 18
(3,944 Views)

BTC_admin wrote:

Ah ok.  Try the connection I am showing in attached image (since I don't have your code, I have edited your image- might have been easier to edit the code):


I have tried what you suggest, but it does not do what I want. I have also added the vi of the test file I have made. That should help.

 


RavensFran wrote:

How do you know?  Did you try what I said?  See attached and tell me how it is different from what you want.



I have actually tried, the best case scenario would be to have what you can see on the attached picture. At the same time, I want to keep what we have worked on here:

http://forums.ni.com/t5/LabVIEW/How-create-a-multi-plot-graph-with-remanence/m-p/2456258#M753795

 

 

 

I hope the vi file will help to understand.

Thank you for help

Download All
0 Kudos
Message 10 of 18
(3,929 Views)