Hello everyone.

I've been trying to figure this out on my own but I haven't been very successful.
I am working on trying to make a graph of individuals killed over the last 4 years either with mental health diagnosis or without. What I want is something like this

https://www.stata.com/support/faqs/g...id-line-graph/

So the frequency of individuals killed by year on the Y-axis with the two lines showing those with mental illness and those without and the years on the X-axis. but every time I try to do something I get something like these.

(I used twoway (line MI Year, sort) for this one)


and this line MI_NP MI_Present Year for this graph


I can not for the life of me figure out what is wrong. I do have the Mental illness variable set up as a dummy variable and the years are broken down into four groups. I have been wondering if I need to fix something in the way the data is set up or if I am just typing commands for what I want wrong.

Any direction you could give me would be greatly appreciated.