BUG: Fix the line style rendering error.

Fix for [#2964](https://github.com/matplotlib/matplotlib/issues/2964).