What is the best way to smoothen out a loss curve plot
You can use the Exponential Moving Average method. This method is used in tensorbaord as a way to smoothen a loss curve plot.

The algorithm is as follow:

However there is a small problem doing it this way. As you can see S_t is initialized with the starting value, which makes the starting curve inaccurate. 

The green curve is the ideal curve for the algorithm, but the purple curve is the predicted curve. The curve is not correct on the start. To solve this, a correction factor is added in, thus making the algorithm this:

This introduces WeightedCount which decreases over time to 0.

Exponential Moving Average is also used is other areas of deep learning, the most notable being some optimization algorithms. It is used in Adam, RMSProp and other similar optimizers to smooth out the gradients to make the path to minimal loss a more direct and straightforward path.