Estou tentando criar um gráfico de dispersão simples onde todos os pontos são coloridos em índigo elétrico:
# AbsVMinus and AbsV are x and y respectively
scatter(AbsVMinusI, AbsV, title = "Color-magnitude diagram", seriescolor = RGBA(140, 20, 252, 1), legend = false)
Escrevi esta linha usando a seção de documentação do Colors como exemplo. No entanto, recebo o seguinte erro:
ERROR: LoadError: ArgumentError: (140, 20, 252, 1) are integers in the range 0-255, but integer inputs are encoded with the N0f8
type, an 8-bit type representing 256 discrete values between 0 and 1.
Consider dividing your input values by 255, for example: RGBA{N0f8}(140/255,20/255,252/255,1/255)
Or use `reinterpret(N0f8, x)` if `x` is a `UInt8`.
See the READMEs for FixedPointNumbers and ColorTypes for more information.
Tentei a sugestão de erro, mas recebo o seguinte:
ERROR: LoadError: UndefVarError: N0f8 not defined
O que estou perdendo aqui?
Todos os argumentos estão na escala de zero a um.
Para ver sua cor roxa, basta fazer:
RGBA(140/255, 20/255, 252/255, 1.0)
Este artigo é coletado da Internet.
Se houver alguma infração, entre em [email protected] Delete.
deixe-me dizer algumas palavras