@@ -106,11 +106,11 @@ public void draw(ImagePlus imp, ImageStatistics stats) {
106106 drawHistogram (imp , ip , fixedRange , stats .histMin , stats .histMax );
107107 }
108108
109- protected void drawHistogram (ImageProcessor ip , boolean fixedRange ) {
110- drawHistogram (null , ip , fixedRange , 0.0 , 0.0 );
109+ protected void drawHistogram (ImageProcessor ip , boolean unused ) {
110+ drawHistogram (null , ip , unused , 0.0 , 0.0 );
111111 }
112112
113- void drawHistogram (ImagePlus imp , ImageProcessor ip , boolean fixedRange , double xMin , double xMax ) {
113+ void drawHistogram (ImagePlus imp , ImageProcessor ip , boolean unused , double xMin , double xMax ) {
114114 setTitle ("Histogram of " +imp .getShortTitle ());
115115 int x , y ;
116116 long maxCount2 = 0 ;
@@ -141,7 +141,7 @@ void drawHistogram(ImagePlus imp, ImageProcessor ip, boolean fixedRange, double
141141 else
142142 drawAlignedColorBar (imp , xMin , xMax , ip , x -1 , y , HIST_WIDTH , BAR_HEIGHT );
143143 y += BAR_HEIGHT +(int )(15 *SCALE );
144- drawText (ip , x , y , fixedRange );
144+ drawText (ip , x , y );
145145 srcImageID = imp .getID ();
146146 }
147147
@@ -282,7 +282,7 @@ void drawLogPlot (long maxCount, ImageProcessor ip) {
282282 ip .setColor (Color .black );
283283 }
284284
285- void drawText (ImageProcessor ip , int x , int y , boolean fixedRange ) {
285+ void drawText (ImageProcessor ip , int x , int y ) {
286286 ip .setFont (font );
287287 ip .setAntialiasedText (true );
288288 double hmin = cal .getCValue (stats .histMin );
@@ -304,12 +304,12 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
304304 }
305305 ip .setJustification (ImageProcessor .LEFT_JUSTIFY );
306306 }
307- double range = hmax -hmin ;
308- if (fixedRange &&!cal .calibrated ()&&hmin ==0 &&hmax ==255 )
309- range = 256 ;
310- double binWidth = range / stats .nBins ;
307+ // double range = hmax-hmin;
308+ // if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
309+ // range = 256;
310+ double binWidth = stats .binSize ;
311311 binWidth = Math .abs (binWidth );
312- showBins = binWidth !=1.0 || ! fixedRange ;
312+ showBins = binWidth !=1.0 ;
313313 col1 = XMARGIN + 5 ;
314314 col2 = XMARGIN + HIST_WIDTH /2 ;
315315 row1 = y +(int )(25 *SCALE );
0 commit comments