05-11-2009 11:48 AM
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
Solved! Go to Solution.
05-12-2009 05:02 PM
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.
05-20-2009 12:51 PM
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