title: How to make a plot with percentiles of one variable on the x axis and the means of another value according to the percentiles on the y-axis?
body: <p>Good time of the day, everybody,</p>
  
  <p>I have what seems to me like a basic question, but I cannot find a fast way to resolve my problem anywhere. </p>
  
  <p>My final goal is to have a plot that goes like this: percentiles of the income distribution on the x-axis and means of another variables, let's say age, organised according to the percentiles of income on the y-axis.</p>
  
  <p>It seems to me like the command collapse should be able to do it, but I can't find a way to specify collapse (by percentiles of income) anywhere.</p>
  
  <p>What I need right now is a row of ages and a row with one of the 100 percentiles values of income, which match up and represent the same individual, I can then do collapse by (my new variable percentile) and then plot.</p>
  
  <p>I appreciate the fact that it is probably a basic question, but I can't seem to find a way to do it!</p>
  
  <p>Thank you very much.</p>