LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom x-axis for graph

Hello,
 
I'm using a Graph which shows the amplitude on the y-axis and the sample-number on the x-axis. The user can select which samples he wants to see. So he can choose sample 2, 4, 7, and 10 for example. The graph shows then the 4 amplitude values, but the values on the x-axis are always 0, 1, 2, 3 but I need 2,4,7,10. Is there a possibilitiy to change that?
 
Cheers,
Rico
0 Kudos
Message 1 of 6
(3,911 Views)
You can set your own markers, or you can use a picture control.
0 Kudos
Message 2 of 6
(3,901 Views)

Hello,

 

It's not possible to set the markers because when I have sample 1,47 and 50, the 1 is on the left and 47,50 are on the right end of the x axis, but the step between the markers has to be consistent.

 

The thing with the picture control looks quite complicated, but I guess it's the only change I have, thanks a lot for showing it!

0 Kudos
Message 3 of 6
(3,876 Views)
The graphic does not work, because it does not update when zooming / values overlap if too many etc...
 
Is there really no other possibility to set the names of the x-axis of a plot, I can't believe that!
0 Kudos
Message 4 of 6
(3,860 Views)
Hi Osiris,

the x-axis shows numbers, not names. So you only can show numbers - and they have to be in correct order/spacing etc. Your option is the picture graph!

"The graphic does not work, because it does not update when zooming / values overlap if too many etc..."
- when zooming the data plot you can check the new x-axis by use of property nodes and adapt your picture graph accordingly!
- overlapping values: you have to check for this when drawing the picture graph by omitting some values - just like the waveform chart adapts the axis when there are too many values to show...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,850 Views)
Hello,

I'm sorry to ask again:

Is the graphic control really the only possibility to do that? It sounds like a quite complicated task to do that (the example above does not really work when the text is orientated normally.

Does someone has already done that work and could share that code?

Thanks!
Rico
0 Kudos
Message 6 of 6
(3,828 Views)