Skip to content

Annotating with Plots.jl or Makie.jl - getting the text coordinates right #111

Description

@tamasgal

I am having trouble to find out how to get the pixel coordinates for a given angle.

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

julia> m = HealpixMap{Float64, RingOrder}(32);

julia> m[ang2pixRing(m.resolution, π/4, 0.0)] = 250
250

julia> m[ang2pixRing(m.resolution, 0.42, 0.23)] = 300
300

julia> plot(m)

julia> annotate!/4, 0.0, "some text")
Screenshot 2024-03-12 at 15 15 52

Here, obviously annotate! is not printed in the coordinate system of the plot. I found ang2pix but that only gives the pixel number. How can I find the "plot coordinate" for a given angle or vector?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions