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

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

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.