Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with datashader!() and xlims!(), ylims!() #4611

Open
thojDufour opened this issue Nov 21, 2024 · 0 comments
Open

Issue with datashader!() and xlims!(), ylims!() #4611

thojDufour opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@thojDufour
Copy link

thojDufour commented Nov 21, 2024

  • [ v0.21.16] what version of Makie are you running? (]st -m Makie)
  • [ Yes] can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • [
                 .o+`                    ------------------
                `ooo/                    OS: Arch Linux x86_64
               `+oooo:                   Kernel: Linux 6.11.9-arch1-1
              `+oooooo:                  Uptime: 2 hours
              -+oooooo+:                 Packages: 1513 (pacman)
            `/:-:++oooo+:                Shell: zsh 5.9
           `/++++/+++++++:               Display (LC49G95T): 5120x1440 @ 240 Hz in 49" [External]
          `/++++++++++++++:              DE: KDE Plasma 6.2.3
         `/+++ooooooooooooo/`            WM: KWin (Wayland)
        ./ooosssso++osssssso+`           WM Theme: Breeze
       .oossssso-````/ossssss+`          Theme: Breeze (Dark) [Qt]
      -osssssso.      :ssssssso.         Icons: breeze-dark [Qt]
     :osssssss/        osssso+++.        Font: Noto Sans (10pt) [Qt]
    /ossssssss/        +ssssooo/-        Cursor: breeze (24px)
  `/ossssso+/:-        -:/+osssso+-      Terminal: konsole 24.8.3
 `+sso+:-`                 `.-/+oso:     CPU: AMD Ryzen 5 7600X (12) @ 5.45 GHz
`++:.                           `-/+/    GPU 1: AMD Radeon RX 7900 XTX [Discrete]
.`                                 `/    GPU 2: AMD Raphael [Integrated]
                                         Memory: 9.64 GiB / 30.56 GiB (32%)
                                         Swap: 0 B / 512.00 MiB (0%)
                                         Disk (/): 1.14 TiB / 1.79 TiB (64%) - ext4
                                         Locale: en_US.UTF-8

                                                                 
                                                                 

] What platform + GPU are you on?

When trying to produce a datashader plot, if the xlims and ylims are defined prior to plotting, the function does not returns a satisfactory results.
The two picture below have been produced with a custom color palette which is not included in the example below. The results of the example below will therefore be slightly different from the pictures, but the issue is independent from the color palette, I checked.
Image
The image above represents the results if the xlims! and ylims! function are called after the first datashader! call.
Image
The image above represents the results if the xlims! and ylims! function are called before the first datashader! call.

Working example

using GLMakie

θ::Vector{Float64} = rand(Float64, 1000000) .* 360
F::Vector{Float64} = rand(Float64, 1000000) .* 70 .+ 50

points::Vector{Point{2,Float64}} = []

for i = 1:lastindex(F)
    push!(points, Point{2,Float64}((θ[i], F[i]),))
end

tit = L"$LaTeX$ Title"
xlab = L"Angle in $[^o]$"
ylab = L"Value $V$ in $[unit]$"

fig = Figure(size=(1900, 1080))

ax = Axis(fig[1, 1];
           title=tit,
           xlabel=xlab,
           ylabel=ylab,
           xminorticks=IntervalsBetween(10),
           yminorticks=IntervalsBetween(10)
       )

datashader!(
               ax,
               points;
               async=false
           )

# If the following two commands are placed before the datashader!() function call, the results will not be satisfactory
xlims!(ax, (0, 360))
ylims!(ax, (0, 200))

wait(display(fig))

fig1 = Figure(size=(1900, 1080))

ax = Axis(fig1[1, 1];
           title=tit,
           xlabel=xlab,
           ylabel=ylab,
           xminorticks=IntervalsBetween(10),
           yminorticks=IntervalsBetween(10)
       )

# If the following two commands are placed before the datashader!() function call, the results will not be satisfactory
xlims!(ax, (0, 360))
ylims!(ax, (0, 200))
datashader!(
               ax,
               points;
               async=false
           )

wait(display(fig1))

Edit: Modified example to include both working and not working results.

@thojDufour thojDufour added the bug label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant