1
$\begingroup$

I use this code

p1 = Graphics[{PointSize[0.05], Red, Point[{{4, 0}, {7, 0}}]}]; p2 = Plot[Sin[x], {x, 0, 10}, PlotRange -> {-2, 2}]; Show[{p1, p2}] 

which gives the plot below.

How to modify p1 so that instead of those filled-in red point markers, I get empty circles with thickness that can be controlled? Is it possible to not change p1 at all, and instead define another code before p1 so that it modifies the result?

enter image description here

$\endgroup$
5
  • 3
    $\begingroup$ Show[{p1, p2}] /. Point[pt_] :> {Point[pt], White, PointSize[.03], Point[pt]}? $\endgroup$ Commented Nov 18 at 13:16
  • $\begingroup$ @cvgmt Thank you very much. Works perfectly $\endgroup$ Commented Nov 18 at 13:22
  • $\begingroup$ You could use Circle instead of Point. $\endgroup$ Commented Nov 18 at 16:17
  • $\begingroup$ @lericr But it requires further modification in p1, yes? $\endgroup$ Commented 2 days ago
  • 1
    $\begingroup$ It depends on how you do it. But, I quote: "How to modify p1 so that...". $\endgroup$ Commented 2 days ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.