|
From: Ethan A M. <me...@uw...> - 2020-09-12 06:19:08
|
On Friday, 11 September 2020 22:51:03 PDT Ethan A Merritt wrote:
> I _think_ that the problem involves this macro in axis.h
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> /* Simplest form of autoscaling (no check on autoscale constraints).
> * Used by refresh_bounds() and refresh_3dbounds().
> * Used also by autoscale_boxplot.
> */
> #define autoscale_one_point(axis, x) do {\
> if (axis->set_autoscale & AUTOSCALE_MIN && x < axis->min) \
> axis->min = x; \
> if (axis->set_autoscale & AUTOSCALE_MAX && x > axis->max) \
> axis->max = x; \
> } while (0);
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> as called from plot2d.c:refresh_bounds() when zooming volatile data.
>
> Note that the macro does not consider the case of reversed axes.
> Adding a test for (axis->min < axis->max) seems to make your
> test case work. See attached patch.
Better patch (but still not fully correct)
Ethan
|