newton[z_] := z - f[z]/f'[z] plot[r_] := ListDensityPlot[Arg@FixedPoint[newton, #, 50] & /@ Table[i + j I, {j, -r, r, 2 r/365.}, {i, -r, r, 2 r/365.}], ColorFunction -> "Rainbow", DataRange -> {{-r, r}, {-r, r}}] f[z_] := z^3 - 1; plot[2.0] [![enter image description here][1]][1] f[z_] := z^5 - 1; plot[2.0] [![enter image description here][2]][2] [1]: https://i.sstatic.net/rWBSq.jpg [2]: https://i.sstatic.net/I2x2u.jpg