Which tools to do a chromaticity diagram?

I want to make some chromaticity diagrams (e.g.https://en.wikipedia.org/wiki/Chromaticity#/media/File:PlanckianLocus.png) and am not sure which Julia graphics package would be most suitable. I’ve been looking at Luxor, Plots, Makie, and Gadfly examples and am leaning to trying in Luxor, but would appreciate any pointers.

I wouldn’t advise Luxor - you’ll have to draw axes and tick marks manually which would be tedious… :slight_smile:

That’s a good point. I guess to be more specific, I want to be able to paint the colors within the diagram per my own functions, but also be able to place labeled points and polygons.

I may end up creating an image in one tool and then use another tool to add things on top of it.

I’m hoping for a unified approach though.

The Bezier meshes in Luxor might be quite useful, but they might be more for illustration purposes rather than precise scientific rendering tools:

@draw begin
    bp = makebezierpath(ngon(O, 250, 3, pi/6, vertices=true))
    mesh1 = mesh(bp, [
        "red",
        "green",
        "blue" ])
    setmesh(mesh1)
    drawbezierpath(bp, :fill)
end
1 Like

The color part would probably most easily be done as an image, e.g. an Matrix{Colorant} with transparent values outside the defined space. Any plotting package in Julia should be able to display an image, and then add the lines on top. In Plots you’d just draw the line segments as a long black line with NaNs between segments, then add the numbers with annotations.