title: Sparse Functional Data Plot
body: <p>I'm wondering how to reproduce the following figure using R.</p>
  <p>The data used in the figure are sparse functional data of bone mineral density. Basically each participant's bone mineral level is observed a few times during the experiment. But the observation times and number of observations for each participant are different.</p>
  <p><a href="https://i.stack.imgur.com/gbq10.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gbq10.png" alt="enter image description here" /></a></p>
  <p>The figure is from article 'Principal component models for sparse functional data'.
  You can find it here <a href="https://hastie.su.domains/Papers/fpc.pdf" rel="nofollow noreferrer">Principal component models for sparse functional data</a> or <a href="https://www.semanticscholar.org/paper/Principal-component-models-for-sparse-functional-James-Hastie/c5f75617c8e7d59109406f04ce8c5a8d6d09eef9" rel="nofollow noreferrer">Principal component models for sparse functional data</a></p>