Pin and pattern are fundamentally the same. Just choose a pin that matches the pattern you would use.
For example, a pattern that follows a square beginning at the upper left and moving down would correspond to the number pattern 1-4-7-8-9-6-3-2-1.
There are some significant advantages to a pin over a pattern;
1) an attacker can't assume that the pattern is continuous. A pin can jump from 7 to 3 without anything in between, whereas a pattern would go through other points.
2) the oils on your fingers leave an impression on the screen matching the pattern you input, making it possible for an attacker to detect your pattern, even VISUALLY, just by looking at the smudges on the screen. Because a pin requires you to lift your finger between points, while it may be possible to detect WHICH points were touched, there would be no evidence of the ORDER.