Ask Your Question

Revision history [back]

Clipping a 2D plot

Dear all,

Best is a small example:

```

def fC(p): return([p[0]/(p[0]+2), (p[1]+1)/(p[0]+2)])

def actOnD(Dom, nbsteps, myz): DomainfC = list(map(fC, Dom)) acolor = Color(0, (20+90*nbsteps)/255, 150/255) ToPlot = polygon(Dom, color = acolor, zorder = myz) if nbsteps > 0: DomainfC = list(map(fC, Dom)) ToPlot += actOnD(DomainfC, nbsteps-1, myz+1) return(ToPlot)

actOnD( [[0,0], [0,1], [1,1], [1,0]], 3, 1)

``` And I would like to show only the plot within a smaller square than the unit one. It seems add_conditions works for parametric plot (though I did not find the documentatin for that, only posts). Many thanks for your lights on that!

Best, Olivier

Clipping a 2D plot

Dear all,

Best is a small example:

```

def fC(p):
    return([p[0]/(p[0]+2), (p[1]+1)/(p[0]+2)])

(p[1]+1)/(p[0]+2)])

def actOnD(Dom, nbsteps, myz): DomainfC = list(map(fC, Dom)) acolor = Color(0, (20+90*nbsteps)/255, 150/255) ToPlot = polygon(Dom, color = acolor, zorder = myz) if nbsteps > 0: DomainfC = list(map(fC, Dom)) ToPlot += actOnD(DomainfC, nbsteps-1, myz+1) return(ToPlot)

return(ToPlot)

actOnD( [[0,0], [0,1], [1,1], [1,0]], 3, 1)

1)

``` And I would like to show only the plot within a smaller square than the unit one. It seems add_conditions works for parametric plot (though I did not find the documentatin for that, only posts). Many thanks for your lights on that!

Best, Olivier