jmbejara / comp-econ-sp18

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2018)
16 stars 23 forks source link

Loess Error #52

Closed bariscangoc closed 6 years ago

bariscangoc commented 6 years ago

Hi Jeremy,

I am getting this error " b'There are other near singularities as well. 0.65044\n'" after trying to use geom_smooth(method="loess"). Do you know what this means?

jmbejara commented 6 years ago

This issue is coming up because you need to use two different aesthetics when creating your plot. Take a look at the "mapping" keyword argument on "ggplot" and "geom_point". The smoothing should not be using the color aesthetic.

bariscangoc commented 6 years ago

It works now if I get rid of the color aesthetic. But the plot we need to have requires to use different color for different classes. How can I add color to this graph?

jmbejara commented 6 years ago

Use the "mapping" keyword argument to supply different aesthetics to different functions.