I have looked into the possible solution, but I am hitting a roadblock constantly!
Here is the sample data

```
S <- c("A", "B", "C", "D", "E","F", "G", "H", "I", "J")
x <- c(-2.5, -7, -1, 0, 2.3, 3.1, 5.2, 4.1, -6.3, 2.1)
y <- c(-1, -3, -1, 1, 1, 2, 3, 3, -3, 1)
z <- c("Poor", "Bad", "Poor", "Okay", "Okay", "Good", "Good", "Good", "Bad", "Okay")

df <-data.frame(S, x, y, z)

df %>% 
  ggplot(aes(y, x))+
  geom_point(aes(color = `z`,
                 size= NULL,))+
  geom_smooth(method = lm,
              se= F)+
  labs(x = "Coded Value",
       y = "Percent", 
       title = "Effects of Change")+
  theme_minimal()

```

This produces a graph like the following [![enter image description here](https://i.stack.imgur.com/wQ4j4.png)](https://i.stack.imgur.com/wQ4j4.png)

Now I would like to specify colors for `z` and get it arranged in the order of `Good`, `Okay`, `Poor`, and `Bad` and not the random ones in the legend.

I have checked a similar [solution](https://stackoverflow.com/questions/15363035/ggplot2-how-to-specify-multiple-fill-colors-for-points-that-are-connected-by-li) and [this one](https://stackoverflow.com/questions/43770579/how-to-change-the-color-in-geom-point-or-lines-in-ggplot) is more closely related to what I am looking to do. However, replicating the solution with `scale_color_manual`or `scale_fill_manual` did not produce the desired result.

I tried the following code

```
df %>% 
  ggplot(aes(y, x))+
  geom_point(aes(color = `z`,
                 size= NULL,
                 scale_color_manual(values = c("Good" = "green",
                                               "Okay" = "blue",
                                               "Poor" = "black",
                                               "Bad" = "red"))))+
 geom_smooth(method = lm,
              se= F)+
 labs(x = "Coded Value",
      y = "Percent", 
      title = "Effects of Change")+
 theme_minimal()

```

and it returned the following error message

```
Don't know how to automatically pick scale for object of type ScaleDiscrete/Scale/ggproto/gg. Defaulting to continuous.
Error: Aesthetics must be valid data columns. Problematic aesthetic(s): x = scale_color_manual(...). 
Did you mistype the name of a data column or forget to add after_stat()?

```

I am looking for help in getting this issue corrected.

On a similar note, for my actual data, `geom_point()` is taking an arbitrary shape (most likely `shape= 18`), which I wanted to specify as well with `shape = 16`, however, it returned an error message as
`Error: A continuous variable can not be mapped to shape`

Thanks in advance!