Skip to content

DataInspector does not work for lines in log10 scale #3571

@mgyoo86

Description

@mgyoo86

I am new to Julia and GLMakie and found some bugs in using DataInsepctor with log10 scales.
I guess this bug is strongly related to #3450 and #3526.

  • Version Info: GLMakie v0.9.6 has a bug, whereas GLMakie v0.8.12 works correctly.
  • Platform: Mac M1
  • The bug is reproducible with a fresh start
  • The following code is a simple example where the DataInspector gave wrong results in the case of log10 scale.

using GLMakie
fig = Figure()
ax = Axis(fig[1, 1], yscale=log10,xscale=log10)
x = 10.0.^vec(-2:2)
lines!(ax,x,10*x)
DataInspector(fig)
fig

The latest version (v0.9.6) and GitHub branches ("master" and "ff/DataInspector_transform_fixes") have been tested and all cases gave the same error of wrong location of the datatip as shown in the image below.
Furthermore, when the cursor hovers on datapoint smaller than one (x<10^0 or y<10^0), then the following error occurs.
Error in callback:
DomainError with -0.607352:
log10 was called with a negative real argument but will only return a complex result if called with a complex argument. Try log10(Complex(x)).

Screen Shot 2024-01-27 at 5 25 15 PM

On the other hand, some older version (I've tested GLMakie v0.8.12) gives the correct location of dataip and works fine for (datapoint <1) without the callback error.

Screen Shot 2024-01-27 at 5 26 52 PM

It would be greatly appreciated if there is a workaround for this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions