136,7 → 136,7 |
|
|
h1[h1d]->minx = minx; |
h1[h1d]->stepx = (nx>1)?(maxx-minx)/(nx-1):0; |
h1[h1d]->stepx = (nx>0)?(maxx-minx)/nx:0; |
|
|
h1[h1d]->size = h1[h1d]->nx*sizeof(double); |
151,7 → 151,7 |
|
|
double _VI_FUNC H1D_GetXBinCenter(int h1d,int xbin) { |
return h1[h1d]->minx+xbin*h1[h1d]->stepx; |
return h1[h1d]->minx+(xbin+0.5)*h1[h1d]->stepx; |
} |
|
|
233,7 → 233,7 |
} |
|
double _VI_FUNC H1D_GetMaxX(int h){ |
return h1[h]->minx+(h1[h]->nx-1)*h1[h]->stepx; |
return h1[h]->minx+ h1[h]->nx-*h1[h]->stepx; |
} |
|
|
270,7 → 270,7 |
if (*plothandle> 0 ) DeleteGraphPlot (panel, control, *plothandle, VAL_IMMEDIATE_DRAW); |
|
*plothandle = PlotWaveform (panel, control, H1D_GetData(histogram), H1D_GetNbinsX(histogram), VAL_DOUBLE, 1, 0, |
H1D_GetMinX(histogram), H1D_GetStepX(histogram), VAL_FAT_LINE, VAL_SMALL_SOLID_SQUARE, VAL_SOLID, 1, |
H1D_GetXBinCenter(histogram,0), H1D_GetStepX(histogram), VAL_FAT_LINE, VAL_SMALL_SOLID_SQUARE, VAL_SOLID, 1, |
hcolors[histogram%8]); |
RefreshGraph (panel, control); |
ProcessSystemEvents (); |