draw linear function