How to change a point to circle in a Graphics expresion [closed]

Given the following line of code,

Graphics[{PointSize[.02],
Point[{9, 5}], Point[{2, -5}], Point[{5, 5}], Point[{3, 6}],Point[{1, 1}],
Point[{5, -7}], Point[{-7, 4}], Point[{6, -10}], Point[{-6, -2}], Point[{0, 8}],
Point[{1, 4}],Line[{{1, 4}, {2, 5}}], Point[{2, 5}]},
AspectRatio->Automatic]


the objective is to replace every Point as a Circle with a radius of 1/2 centered around the same coordinates. The question asks for this to be done using a ReplaceAll (aka Rule) function.

I know how to replace points with circles. Just add /. Point -> Circle to the end of that block. And it goes from plotted dots to circles.

But how do I change the radius to 1/2 using the Rule function? Because when I replace Point with Circle, it results in Circle of radius 1. The only way I could think was something like /. Point[{ _ , _ }] -> Circle[{ _ , _ }, 0.5], but that of course didn't work.

Any help is much appreciated!

• You could try yourgraphics /. Point[x_] -> Circle[x, 1/2] – Fred Simons Jun 24 '15 at 14:29
• Look up Blank. – J. M.'s technical difficulties Jun 24 '15 at 14:29
• This is my take on using Blank. /. Point[{_, _}] -> Circle[#, 0.5] It doesn't work, however. Can someone please explain what I did wrong/need to change? – A is for Ambition Jun 24 '15 at 14:34
• @FredSimons it doesn't work :( – A is for Ambition Jun 24 '15 at 14:36
• On my computer, it works. But it might be that somewhere you did an assignment to x. Then use :> instead of -> (RuleDelayed instead of Rule) – Fred Simons Jun 24 '15 at 15:12

g = Graphics[{PointSize[.02], Point[{9, 5}], Point[{2, -5}], Point[{5, 5}], Point[{3, 6}],

• @AisforAmbition, questions like your first can be easily answered using the built-in documentation. Just highlight '&' and press F1. You need the second hit (Function). As to your second question: This has to do with operator precedence. Precedence of -> is higher than & and the pure function Circle[#, .5] & needs to be protected from being read as (Point -> Circle[#, .5] )&. You can find the precedence table on the tutorial/OperatorInputForms page of the documentation. – Sjoerd C. de Vries Jun 24 '15 at 14:58