tlycken/Contour.jl — pull request #14 by darwindarak (2014-10-08 00:47:35+00:00)
Title: WIP: Fix handling of ambiguous cell types (#12)

Identifying contour directions using CW and CCW does not make any sense, especially when dealing with ambiguous cells. Instead of using a lookup-table, this new approach explicitly identifies how a contour crosses a cell using compass directions (e.g. a cell with a NW contour means that a contour line joins its north and west edges). Normal cells will have only one crossing, while ambiguous cells will have two crossings.
As we process the list of cells, we only remove a cell when we have interpolated all of its contour crossings. This way, there shouldn't be any premature removal of cells. I'll add in more detailed documentation in the code.

Plotting the data from dcjones/Gadfly.jl#420 now gives

![gadfly_issue420](https://cloud.githubusercontent.com/assets/7328215/4552343/ff65bb92-4e81-11e4-8057-7f6ac0862631.png)

However, it currently fails the simpler test case given by @tlycken in #12

```julia
x = float([1:3]); y = copy(x); z = eye(3,3);
plot(z=z,x=x,y=y,Geom.contour)
```
gives

![eye_contour](https://cloud.githubusercontent.com/assets/7328215/4552344/0146364e-4e82-11e4-994a-76015aab2a13.png)