Colour Science

How to zoom in the CIE 1931 Chromaticity Diagram?

Hi, I assemble chromaticity data xy in a list called observations. I want to plot those in a chromaticity diagram. I want to have a closer look at the variation of the data, but don’t know how to do that. I scanned the docs, but did not find a clue.

I use code taken from the docs, slightly modified to meet my needs:

 annotate_kwargs = [
    {'xytext': (-25, 15), 'arrowprops':{'arrowstyle':'-'}},

plot_kwargs = [
        'markersize' : 15,
    {   'color': 'r'},

    ['A', 'B', 'C'],
    standalone = False        

for  ii in range(len(observations)) :
    xy = observations[ii] #OK
    x, y = xy
    plt.plot(x, y, 'o-', color='black') #'white'
    # Annotating the plot.
    plt.annotate('Obs '+str(ii),
    xytext=(-50, 30),
    textcoords='offset points',
    arrowprops=dict(arrowstyle='->', connectionstyle='arc3, rad=-0.2'))    


Where can I put the x and y range for the axes?

And just one other question: I don’t want to show the A, B and C illuminants in the plot. What do I have to do to remove those? Simply using an empty [] i.s.o [‘A’, ‘B’, ‘C’] leads to an exception…

Thanks, Fred

Hi @Fredckx,

I suppose it is you over there: How to zoom in the CIE 1931 Chromaticity Diagram? · Discussion #761 · colour-science/colour · GitHub?

If so, please let me know where you want to continue this thread, either way is fine! :slight_smile: