LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot constant width-- bar graph?

Solved!
Go to solution

hi all?? I'm having a problem...

 

I'm having two 1D arrays, I have plotted them by using XY graph with bar graph, The probelm is i'm not able to get the bar graph with consant width.

 

How to get the bar with constant width...

 

Could any one Please through some light for my querie?

 

 

I'm attaching my VI, front panel, block diagram

 

Thanks in advance..

 

 

Download All
0 Kudos
Message 1 of 5
(3,217 Views)

Hi girikavali,

 

you need to supply data with constant gaps between x coordinates...

 

Easiest would be to include some more points in your data: add a point "left" and "right" to each x value with constant dx ("x-dx" and "x+dx"). Use "NaN" as y value sfor these added points...

 

Example:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,204 Views)

Thank You GredW.

 

Is there any programming way to do that.. I mean by using property node (or by another way) to maintain the constant bar width.

 

Thanks & Regards..

0 Kudos
Message 3 of 5
(3,193 Views)
Solution
Accepted by topic author girikavali

Hi girikavali,

 

you could do some programming to create a subVI that adds those NaN-points automatically?

Best regards,
GerdW


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

Thank you GredW..... I got it....

0 Kudos
Message 5 of 5
(3,183 Views)