Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I need to plot a complex implicit function, ContourPlot in this case is not very convenient for me. Therefore, I want to plot my function using discrete points. I think this simple approach is convenient, both for me to understand and for those who I want to help. So let's plot the unit circle using ListPlot. I can do it in this way (I'm sure there is much simpler way):

y[x_] := y /. FindRoot[x^2 + y^2 == 1, {y, 0.01}]
data = Table[{x, y[x]}, {x, -1, 1, 0.1}]
y2[x_] := y2 /. FindRoot[x^2 + y2^2 == 1, {y2, -0.01}]
data2 = Table[{x, y2[x]}, {x, -1, 1, 0.1}]
ListPlot[{data, data2}, PlotStyle -> {Black, Black}, AspectRatio -> 1]

Now I want to set constraint on the solution of y, say y < 0.5. How could I do this by using Select?

share|improve this question
1  
Like Select[data, #[[2]] < .5 &]? –  belisarius Oct 29 '13 at 6:52
    
Yes, that's what I need. Thanks a lot –  Knightq Oct 30 '13 at 1:55
add comment

1 Answer

Why bother with Select? Why not just change your Plot options to show what you want?

ListPlot[{data, data2},
  PlotRange -> {Full, {-1., 0.5}},
  PlotRangePadding -> 0.05,
  PlotStyle -> {{Black}},
  AspectRatio -> Automatic]

plot.png

share|improve this answer
    
Because that's just toy model, for the complex implicit function, I need to select out the solution with every small imaginary part. Thanks all the same. –  Knightq Oct 30 '13 at 1:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.