|
From: Daniel J S. <dan...@ie...> - 2006-08-16 19:16:45
|
Ethan Merritt wrote: > On Wednesday 16 August 2006 11:13 am, Daniel J Sebald wrote: > >>Ethan Merritt wrote: >> >>>Someone on the usenet group reported a problem that boils down to >>> set log y >>> plot newhistogram "title", <foo>, <baz>, ... >>> >>>The result is an error return >>> histogram has y coord of 0; must be above 0 for log scale! >>> >>>Now in fact the histogram itself is fine. >> >>How is this fine? If one of the histogram bins has a value of 0, >>log(0) is undefined. Do you mean there is special code to deal with >>this case? > > > The error message comes from the title. > Remove the title, no error message - the histogram itself has > no problem. > > The error message is totally a false alarm, based on checking > the "offset" value of the title string. Oh, yes now I see what you mean. Well, the test should be against the eventual placement, not the offset, right? Writing a patch for this would take a bit, but I don't see how one can do arithmetic on offsets using a logarithm scale, i.e., log(x+y) != log(x) + log(y). I would guess this: x = map_x((hist->start + hist->end) / 2.); y = xlabel_y; x += (int)xoffset_d; y += (int)yoffset_d + 0.25 * term->v_char; has to come before this: map_position_r(&(histogram_opts.title.offset), &xoffset_d, &yoffset_d, "histogram"); in some fashion. Dan |