DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the command D2CurveSpecOffs work for a bargraph in DIAdem 11.0?

Solved!
Go to solution

Hi,

 

I'm having a difficulty getting the command D2CurveSpecOffs to work for my custom vertical bargraph (histogram).  I'm opening and closing the objectnames just fine, since I can adjust other aspects of the graph.  From what I understand, does D2CurveSpecOffs allow me to offset the vertical bar left to right relative to the value it represents on the x-axis?  Right now, it appears that the bar is centered over the x-value.  But because each bar in my bar graph represents a different range, i.e. 0.25 to 0.5 = 1000 counts, I would like the right edge of the bar to line up with 0.5 (0.5 lines up with 1000 as the X-axis & Y-axis channels)  So, to my understanding, I should set the D2CurveSpecOffs = 100, or -100, etc.

 

Example of the 2 channels:

(Ch1) Counts,  (Ch2) Values

0.25, 1200

0.5, 1000

1, 125

2, 13

 

etc.

 

Maybe I'm not fully understanding what D2CurveSpecOffs allows me to do.  I'd appreciate your input.

 

- GvG

0 Kudos
Message 1 of 3
(3,906 Views)
Solution
Accepted by topic author GvG

GvG,

 

D2CurveSpecOffs does allow you to specify the percentage offset on the X-Axis for  bar graphs. You can see the before and after pictures I have attached below. I would recommend that you modify the offset manually in the report, and then with the Curve Parameters window press Ctrl+A this will copy your settings, and you can then go into your script file, and press Ctrl+V  to paste the modified parameters with your graph and curve name already filled out. It seems that the value you specify with Offset is used in conjunction with the bar's width to compute its final position, so even if you leave the offset the same and change the width, your bars will move. 

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
Download All
0 Kudos
Message 2 of 3
(3,871 Views)

Thank you Richard.  Learning how to adjust the curve parameters did start me on the path to where I wanted to go.  I ended up needing to create a channel for each 'bar data point'.  This allowed me to position each bar in the correct location since the bar width could vary from graph to graph.  It took a little more graph manipulation, but I got there eventually.  See attached as a rough example of what I ended up with.  (data ranges: 0-0.3, 0.3-0.5, 0.5-0.7, etc.)

 

Sincerely,

GvG

0 Kudos
Message 3 of 3
(3,819 Views)