The above code generates the picture below, which is exactly what I would expect:

If you change the node fill color:
r.node_renderer.glyph.fill_color="red"
Then the legend also changes correspondingly:

which is also exactly what I would expect. You will need to describe what you are trying to accomplish in much more detail.