Giter Club home page Giter Club logo

Comments (7)

SimonDanisch avatar SimonDanisch commented on June 18, 2024 1

I think, you could define your own Makie.data_limits as a work around for now!
E.g. like this:

function Makie.data_limits(p::ScaledImage)
     edges = Point2f.(p[1][], p[2][]) # Get edges, pseudo code, needs to be 4 edges
     scaled_points = # scale the points
     return limits_from_transformed_points(scaled_points )
end

from makie.jl.

eliascarv avatar eliascarv commented on June 18, 2024

Hi @SimonDanisch, I was using the limits_from_transformed_points function, but it seems to have disappeared in newer versions of Makie.jl. What would be the alternative to this function?

from makie.jl.

asinghvi17 avatar asinghvi17 commented on June 18, 2024

boundingbox(plot) would be the best replacement.

from makie.jl.

eliascarv avatar eliascarv commented on June 18, 2024

Like this?

function Makie.data_limits(plot::ScaledImage)
  return boundingbox(plot)
end

from makie.jl.

asinghvi17 avatar asinghvi17 commented on June 18, 2024

Most likely - but you may not need it at all in 0.21 with the changes to boundongbox computation

from makie.jl.

ffreyer avatar ffreyer commented on June 18, 2024

data_limits(plot) = boundingbox(plot) goes against what data_limits is supposed to do and it will break when transform functions are involved. I would also consider this an Axis bug now

from makie.jl.

ffreyer avatar ffreyer commented on June 18, 2024

Actually this isn't even an issue right now. We're including model in an incorrect way atm (which I thought would be the same as pre 0.21), so for the opening example I do get the correct scaling. What's missing is the tight spacing that you get from Makie.needs_tight_limits(::ScaledImage) = true, but that's expected.

Another issue you can run into atm is that the root plot's model matrix is considered here, not the ones of each children. so if you scale the image plot instead of the ScaledImage it won't work.

from makie.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.