JuliaGeometry / JuliaGeometry/Contour.jl

contour label in Contour.jl

Open
#79 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
46
Forks
15
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the contour loop in the issue and inspect Contour.levels, Contour.level, Contour.lines, and Contour.coordinates. Confirm whether contour-label placement is supported by Contour.jl itself or belongs to the plotting layer, then document a verified approach or example.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.