1
$\begingroup$

Using this code

A := Cos[3 y] + (7 Sin[3 y])/(2 y) + (-Cos[x] + Cos[2 y]) Csc[ 2 y] Sin[3 y];
B := (Cos[2 y] - Cos[x]) Csc[2 y] + Sqrt[-1 + (Cos[3 y] + (2 - y Cos[x] Csc[2 y]))^2];
F := (Cos[2 y] - Cos[x]) Csc[2 y] - Sqrt[-1 + (Cos[3 y] + (2 - y Cos[x] Csc[2 y]))^2];
p = Plot[1.6 , {y, 0, 3}, PlotStyle -> Directive[Thickness[0.02]], PlotRange -> {0, 1.7}];

Module[{colorsDot = {Black, Green, White}, 
  colorsLine = {Orange, Black, Green}, 
  pairs = Subsets[{" A ", " B ", " F "}, {2}], plt, pts}, 
 Show[Show[p,  plt = Plot[Evaluate[ToExpression[#[[1]]] /. x -> -4], {y, 0, 3}, 
       PlotRange -> {0, 1.5}, PlotStyle -> #[[2]],  PlotPoints -> 1000], 
     Graphics[{{PointSize[0.04], #[[3]], pts = Point@Graphics`Mesh`FindIntersections[plt], 
        pts /. {y_, x_?NumericQ} :> {y, 1.6}}}],  PlotRangeClipping -> False, 
     ImagePadding -> {{Automatic, 10}, {Automatic, 20}}] & /@ 
   Transpose[{pairs, Subsets[colorsLine, {2}], colorsDot}]]]

I get the plot number $1$.

enter image description here

Question:

How can I get rid of the curves $A,B,F$, i.e. the green, orange, and black curves (I can set the opacity of them to zero, but cannot get rid of those intersection points)? in addition to having those green and black points over the blue line (instead of behind it; actually, I change their order in Show but it gives an error)? I mean something like the plot number $2$.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

For a minimal change to your code,

  1. replace , with ; after plt = Plot[...] and after pts = Point@..., and
  2. move p outside the inner Show (that is, replace Show[Show[p, stuff]] with Show[p, Show[stuff]])

to get

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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