I’m trying to draw individual marks, such as a circle, at specific points on a canvas. However, I’ve run into a challenge: it seems there’s no direct way to place a mark exactly where I want.
Initially, I tried drawing an invisible line with a mark at the endpoint, but the mark doesn’t align precisely with the line’s endpoint coordinates. As a temporary solution, I used a Unicode character for the mark, as shown below:
Using marks anchor style-attribute (possible values are: center, tip, base), you should be able to control the positioning:
#canvas({
import draw: *
grid((-1,-1), (1,1), stroke: .25pt + gray)
// ,---- Direction to point at
mark((0, 0), (1,0), symbol: "o", anchor: "center")
// ^--- Position of the mark
})