I have a complexe function $f:\mathbb{C}\to\mathbb{C}$, and want to draw the locus where $f$ is in the interval $[0,1]$. I made the following (where $f$ is my complex function):

```
x=var('x');assume(x,'real');
y=var('y');assume(y,'real');
F=f.subs(z==x+I*y)
P=lambda x,y:F.subs(x=x,y=y).real();
Q=lambda x,y:F.subs(x=x,y=y).imag();
region_plot([P(x,y)<=1,P(x,y)>=0,Q(x,y)==0], (x,0,5), (y,-1,1))
```

That works well for small functions (low degree) but for big functions it's too long. I think there should be something better. I've seen for example the function complex_plot works well even for big functions and seems to do something more complex.

Does somebody has any idea?

Thanks