Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I create a Rectangle of dimensions 1 and 3. Is there any function in Mathematica that I can use to recover the dimensions of the original rectangle? If there is no such a function, is there a way of recovering the dimensions?

share|improve this question

I assume you mean from a Graphics object. If so, something like:

Cases[g, Rectangle[x___] :> {x}, 2]

where g is the graphics object will return a list of coordinates from which dimensions can be derived.

share|improve this answer
It works perfectly, thank you very much – libercaptor Mar 19 '14 at 1:21
Worth to add Normal on g in case of GraphicsComplex. – Kuba Mar 19 '14 at 6:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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