I encounter this very often, here is just one recent example: I want
StreamPlot[ReIm[Sqrt[x+I y]],{x,-3,3},{y,-3,3},StreamStyle->"Line"]
and because of square root ambiguity get this unpleasant slit on the left:
Doing this with arrows reveals the reason -
Having seen this I managed to figure out how to fill the gap,
StreamPlot[{Sign[y]Sqrt[(Sqrt[x^2+y^2]+x)/2],Sqrt[(Sqrt[x^2+y^2]-x)/2]},{x,-3,3},{y,-3,3}]
gives what I want, namely
However this is clearly ad hoc and clumsy, and also there are more complicated cases where I don't know how to proceed, like e. g. those ugly white crosses in
ContourPlot[Arg[JacobiCN[x+I y,1/2]],{x,-5,5},{y,-5,5},ColorFunction->Hue]
Is there some uniform remedy for such cases?
Comments
Post a Comment