In a notebook I would like to be able to access and modify the properties of draw tools objects after I've drawn them on a graph by hand.

For example, if make a plot and, with draw tools, make a circle, is it possible now to access the circle Graphics object and its properties with commands in the notebook?


1 Answer 1


Yes, this is surely possible because the graphics created with the Drawing Tools is just a normal Graphics object. Let me give you an example. I made a new drawing and assigned it to a variable:

Mathematica graphics

Now I can work with img in the same way I would do it with other graphics. For instance you could look at the code you have created:

(* Graphics[{Circle[{0.9027777777777779, 0.1972222222222222}, 
   {0.26527777777777783, 0.13611111111111107}], 
  {EdgeForm[{GrayLevel[0.], Opacity[1.], AbsoluteThickness[1]}], 
   FaceForm[Hue[0.5, 1., 1.]], 
   Style[Rectangle[{0.17222222222222228, 0.8083333333333333}, 
     {0.6375000000000002, 0.41388888888888875}], 
    RectangleBoxOptions -> {RoundingRadius -> 0}]}}, 
 ContentSelectable -> True, ImagePadding -> {{0., 0.}, {0., 0.}}, 
 ImageSize -> {480, 360}, PlotRange -> {{0., 1.3333333333333335}, 
  {0., 1.}}, PlotRangePadding -> Automatic] *)

And of course you can manipulate everything for instance by replace parts of the graphics:

img /. Circle[pt_, r_] :> {FaceForm[Red], Disk[pt, r]}

Mathematica graphics

  • $\begingroup$ Yes, thank you very much for the quick response. Nice example. It seems rather obvious now. $\endgroup$ Commented Mar 19, 2014 at 22:50

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.