Drawing a line that varies in thickness

Hallo all,

I want to draw a line that varies in thickness.  As an example:  The line starts with a thickness of 0.2 mm (start node to 2nd node), then becomes 0.3 mm thick (from 2nd node to 3rd node), and then change back to 0.2 mm.

how can I do this? (It must be one line)