Skip to content

contour label in Contour.jl #79

@raman-maker

Description

@raman-maker

How to add contour labels in plot while using Contour.jl package? My code is shown below:

for cl in Contour.levels(Contour.contours(x, z, z_log, 10)) lvl = Contour.level(cl) # the z-value of this contour level for line in Contour.lines(cl) xs, ys = Contour.coordinates(line) # coordinates of this line segment lines!(ax, xs, ys, color=lvl, colorrange=ctrange, colormap=:jet) #text!(ax,position=Point2f0(mean(xs), mean(ys)), string(round(lvl, digits=2)), align = (:center, :center)) end end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions