2
$\begingroup$

I want to draw a circle and two lines, which I'm doing as follows:

Plot[{}, {x, 0, 1}, Epilog -> {Red, Circle[{.5, .5}, .5],
   Red, Line[{{0, .993}, {.5, .993}}],
   Green, Line[{{.5, 993}, {.5, .5}}]}]

I see two problems:

  • The circle looks like an ellipsis because the axis are scaled. How can I avoid this?
  • The green line seems to be starting above 1 rather than at 0.993.
  • Any better way to do this than with Plot[...], as I only want to draw things, without plotting a function?

enter image description here

Any suggestions are greatly appreciated

$\endgroup$

1 Answer 1

3
$\begingroup$

Use the option AspectRatio -> Automatic:

Plot[{}, {x, 0, 1}, 
 Epilog -> {Red, Circle[{.5, .5}, .5], Red, 
   Line[{{0, .993}, {.5, .993}}], Green, 
   Line[{{.5, .993}, {.5, .5}}]}, 
 AspectRatio -> Automatic]

enter image description here

More straightforward way to get the same result is to use Graphics:

Graphics[{Red, Circle[{.5, .5}, .5], 
  Red, Line[{{0, .993}, {.5, .993}}],
  Green, Line[{{.5, .993}, {.5, .5}}]}, 
 Axes -> True]

enter image description here

$\endgroup$
1
  • $\begingroup$ that looks great, thanks $\endgroup$
    – Nickpick
    Dec 31, 2020 at 14:45

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.