06-13-2013 08:09 PM
There is no way I know of to have an X axis with unequal spacing like that where you skip over a long range of numbers in a very short space.
If you want something like that, I think you'll need to build up your own graphics in a picture indicator.
06-13-2013 08:12 PM
RavensFan wrote:
If you want something like that, I think you'll need to build up your own graphics in a picture indicator.
Could you develop what you mean please?
06-13-2013 08:24 PM
I'm not going to create an example because I think it is too much work.
But if you look through the graphics palette, you'll see there are a bunch of picture drawing functions. You'd need to fill your picture with a grey background using a draw rectangle. Draw a black rectangle to be your graph background. Draw in short lines at the appropriate locations to be tick markers on the axis. (It will be a fair amount math to determine the locations.) Use the draw text functions to put the numbers in. Then finally, use the draw lines functions (again using math to translate your X, Y's of your data to X, Y pixel locations in the picture) to draw your wave segments.
It would be a lot of work, but certainly doable. I would make a nice package of subVI's to do all the lower level math calculations so those details can be abstracted out.
06-13-2013 08:47 PM
Another approach which might get you close is to use two XY graphs. Make one transparent and use arbitrary marker spacing on the x-axes. It will still take a fair amount of work with property nodes to get the scales the way you want, if it is even possible.
Note that the Xmin and Xmax scale values have both graphs' values overlapping.
Here is what it looks like at an intermediate step in the process.
Lynn
06-14-2013 01:44 AM - edited 06-14-2013 01:52 AM
@MattWSU wrote:
@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.
I hope the vi file will help to understand.
Thank you for help
Actually if you followed what I suggested, it is possible to do what you're meaning to get out of a waveform or an XY Graph (yes, you can "create" a broken X-axis with little bit of trick- although if you're new to LabVIEW then you may experience a bit of difficulty.)
Attached is another example without doing any additional graphical tricks (well, a very tiny one) - I took your vi with waveform indicator in it, got rid of unnecessary items and made the graph look just like how you wanted: plot0 has scale 10~20 and plot1 has scale 90~100. Copy that graph "as-is" to your own application (drag it from the vi I have attached to your vi) and simply follow the logic I have shown. If you have more than 10 data points, you'll need to play with X-axis scaling - like I mentioned earlier, you can have multiple X-axis and you'll have to learn a little bit on how to "manipulate" them look like an X-axis with "special" scale. It is also very much possible to implement configurable time-scale/etc (or if you want to specify scale for each plot, do that through property nodes) - possibilities are limitless!
Good luck, sorry I don't have time to polish my example vi and make it perfect for your application, but it is very close.
-DP
(Hey I deserve a kudo for that! )
06-17-2013 08:42 AM
BTC_admin wrote:
Hey I deserve a kudo for that!
You are very close to get a kudo indeed
I said very close because the ranges 10-20 and 90-100 were for the shake of the example. Indeed, those values change every time the program is run. Therefore, I need to dynamically allocate the X axis depending on the number and range of each "mini-measurement". I'm very familiar with the property nodes, but I just would like you to give me a little more information on how to create/manipulate the different parts. I think I understand the general idea (create different x axis which are then displayed back to back). However, I can't figure out which property node to use (there are a lot of them as you know). So, I would appreciate if you can point me in the right direction.
Thanks!
06-17-2013 11:22 AM
06-17-2013 11:52 AM
Oh man, that's super neat!
Thanks a lot!