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

This answer at Math.SE contains a neat contour diagram created using Mathematica:

What Mathematica functions I can use to draw diagrams like this?

share|improve this question
Line, Arrow and Circle inside Graphics; also Point and Text. I imagine the contour was done "by hand", so to speak, inserting appropriate coordinates. – Michael E2 May 22 '13 at 0:32
up vote 7 down vote accepted

Here's a quick 5 minute reproduction of the diagram (I've left the labeling of individual points out):

enter image description here

With[{ε = 0.05, L = 1, thick = AbsoluteThickness[1]}, 
        Circle[{0, 0}, ε, {π/2, 3 π/2}], 
        Arrowheads[{{0.05, 0.99}}], 
        Arrow[{{0, -ε}, {L, -ε}, {L, -L}, {-L, -L}, {-L, L}, {L, L}, {L, ε}, {0, ε}}], 
        Text[Style["\!\(\*SubscriptBox[\(C\), \(n\)]\)", FontSize -> 15], {L/2, 0.1}]
    }, Axes -> True, AxesStyle -> thick, Ticks -> False]

The key points to make life simple are:

  • Use a single Arrow chain for the entire length.
  • Use the appropriate definition of Arrowheads to specify the position of the arrow head.
  • Use AbsoluteThickness to get a uniform thickness.
  • Use the 3 argument form of Circle to draw arcs.
share|improve this answer
Graphics[{Circle[{0, 0}, 1, Pi/2 {1, 3}], 
           Arrow[{{10, 1}, {0, 1}}], 
            Line[{{0, 1}, {10, 1}, {10, 10}, {-10, 10}, {-10, -10}, {10, -10}, {10, -1}, {0, -1}}]},
         Axes -> True, Ticks -> None]

enter image description here

share|improve this answer
Congratulations on 30K and 81K network, belisarius. :-) – Mr.Wizard May 22 '13 at 5:47
@Mr.Wizard Thanks a lot :) – Dr. belisarius May 22 '13 at 11:48

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.