fix an ancient bug in retrieving the data with the cursor
from a log y graph: use y-offset instead of x-offset
This commit is contained in:
parent
908339359a
commit
e3b2b395b9
|
|
@ -668,7 +668,7 @@ X_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy)
|
|||
{
|
||||
lmin = log10(graph->datawindow.ymin);
|
||||
lmax = log10(graph->datawindow.ymax);
|
||||
*fy = exp(((graph->absolute.height - y - graph->viewportxoff)
|
||||
*fy = exp(((graph->absolute.height - y - graph->viewportyoff)
|
||||
* (lmax - lmin) / graph->viewport.height + lmin)
|
||||
* M_LN10);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,7 @@ static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy)
|
|||
{
|
||||
lmin = log10(graph->datawindow.ymin);
|
||||
lmax = log10(graph->datawindow.ymax);
|
||||
*fy = exp(((graph->absolute.height - y - graph->viewportxoff) *
|
||||
*fy = exp(((graph->absolute.height - y - graph->viewportyoff) *
|
||||
(lmax - lmin) / graph->viewport.height + lmin) * M_LN10);
|
||||
} else {
|
||||
*fy = ((graph->absolute.height - y) - graph->viewportyoff) *
|
||||
|
|
|
|||
Loading…
Reference in New Issue