How do I draw M-PAM curves of Channel Capacity Vs SNR?
No closed form expression exists for the capacities.
The best you can do is numerical approximation.

The capacity is the mutual information between Y and X, where Y=X+N, X is the constellation point (in your case a PAM), and N is Gaussian.

Then, the mutual information is I(Y;x) = H(Y) - H(Y|X).
The second term is easy (working it you yourself if you want).

For the second term you need to go numerical.
Here is the link to a nice matlab tool box. https://github.com/lacerbi/gmm1
What you need is gmm1ent.m.

Good luck.