Dear all,

I am trying to plot net transfers by groups in € (y-axis) against age (x-axis) in one graph
I defined the variables where anhhgba represents the monetary annual sum for each household, then I sorted them as follows according to age and group to get the annual average:

Code:
bysort age group: egen grouphhgba_mean = mean(anhhgba)                                
twoway (line grouphhgba_mean age [aw=hhrf], sort), by(group)
I am not sure if this is the correct way to create the graph, the command above creates two but I want only one graph in which two lines should be shown for the two groups in the same graph.
In general, is line graph the best way to plot this or would you suggest another better way?

Regarding the weights, I tried applying different weights (aw, pw, none) all give the same result and the same graph. I searched and it seems that weights will not change the graph unless some step is made beforehand, the post however did not explain much how this could be done. Which weights should fit into this? And how to get a weighted graph in the end? (I can shift to any other graph type not necessarily a line graph)

For some suggestions I would be grateful!