RGBA error for step2/course 3 - storytellingdatavisualization

Screen Link: Learn data science with Python and R projects

My Code:

for ax in axes:
    ax.axhline(y=1600, xmin=0.5, xmax=0.8, linewidth=6, color='#af0ble', alpha=0.1)


What I expected to happen: I expected the output to have a graph

What actually happened:

ValueError: Invalid RGBA argument: '#af0ble'

my code matches with the answer that is provided. however when I run my code it errors out.

Hi @nimmiph and welcome to the community!

Since RGBA arguments are coded using hexidecimal notation (ie using the characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, and f) the error you’re seeing is actually correct since l is not one of those characters. However, it does look a lot like the character 1 :sunglasses:

I think if you change #af0ble to #af0b1e it should work okay.

1 Like