change linewidth to enum
solve bug in default double