I would like to draw a as shown below. It is a square grid. Some regions are hatched in blue, others contain a red cross. Some edges are blue, others are red, but the red color don't reach the vertices, it stops just short of them, revealing the underlying thin black grid. Some vertices are colored red, others are colored blue.

I think I can draw the underlying grid myself, either by manually entering coordinates and instructions to link vertices by straight edges or using the grid command, and I think I should also be able to draw colored thick nodes that cover up whatever they lie on top of. however, I don't know how to draw the "hatched" region.

I want to include this drawing to lecture notes on homotopy theory I'm typing up. One defines a function by some fixed expression on the blue part of the grid, and inductively extends it to the whole square, first on the red vertices, then on the red edges, and lastly on the faces containing a red cross.

It seems the pattern library will be useful.
–
Olivier BégassatSep 29 '13 at 22:33

Could you elaborate on how you want to input the data. This is easily doable with TikZ but I’m guessing you want not to create each diagram from scratch. I see: a grid (is this squared-based or line-based?), blue lines making a filling, blue and red dots on the crossings of the grid, blue lines (without filling), red lines (that do not touch the crossings of the grid).
–
QrrbrbirlbelSep 29 '13 at 23:36

Could you provide a starting point in the form of your efforts so far?
–
cmhughesSep 29 '13 at 23:43

update

This is just what I need, thank you! But when I copy and paste this into my existing file, it doesn't work, it doesn't work either when I paste the whole text in a new tex document. I get the error message l.10 ...\psline[linecolor=red](6pt;135)(6pt;-45)}} The control sequence at the end of the top line of your error message was never \def'ed
–
Olivier BégassatSep 30 '13 at 0:31