Hello,
I am trying to create a scatterplot from the Titanic dataset, and I want to graph Age vs Fare, with a hue of PClass. I am trying to change the color of the Pclass, but the output is "Error: Discrete value supplied to continuous scale". I have looked at different posts, and have tried different approaches. It seems to work only when I don't use factor, but then the Pclass scale displays numbers other than 1, 2, and 3, which I don't want since there are only 3 values for Pclass.
Can someone explain what I am doing wrong with the code, and how I can fix this error?
Thank you in advance!