I have some XYZ coordinates that I want to represent in the CIE 1931 color space, like so:
I need the diagrams but I couldn't find any possible way to represent it online or with R. Do you know how to do it or if it's even possible?
You can use the package pavo. More specifically, you're looking for the cieplot() function.
It's designed to work with specific S3 objects (results of the colspace()) but since you say you already have the coordinates, we'll have to work around it:
# Generate a fake dataset
set.seed(20190320)
coldat <- as.data.frame(matrix(runif(n = 30, min = 0.15, max = 0.5), nrow = 10, ncol = 3))
# Make sure this dataset works with the cieplot() function
attr(coldat, "clrsp") <- "CIEXYZ"
colnames(coldat) <- c("x", "y", "z")
cieplot(coldat)
convertColor()function already implemented inR. There is also a whole package onCrancolorspace that allows you to do this and a lot more.