To aggregate two stocks, you have to imagine a portfolio with them in some ratio. The natural thing is $\frac 12$ each by starting dollar value, so you bought the same dollar amount of each on day $1$ and held it throughout. Or maybe you rebalance at the end of each year-selling the one that has gained the most and buying the other so you start each year with the same dollar amount. Maybe you like Apple better than Microsoft, so your portfolio is $\frac 34$ Apple and $\frac 14$ Microsoft. The S & P 500 is essentially this with (about) 500 stocks in a ratio of market capitalization. To create the data, just make a column with the Apple and Microsoft prices each day, then evaluate the value of the portfolio under the rules you choose.
If it sounds like this is more about what you want to plot than how to do it, you are correct. That is the hard part. Whatever you plot, please state clearly what you are plotting.