1
$\begingroup$

I want to plot the following illustration in mathematica.

  1. First I need to plot a half open interval $(a,b]$ on a real line (ticks and labels are not needed).

  2. Then I need a piece of symmetric curve over "$b$" to indicate the neighborhood of $b$ with radius $\epsilon$.

I am not familiar with such plot. Can anyone provide some help. Thank you!

enter image description here

$\endgroup$
0

2 Answers 2

8
$\begingroup$

How about that:

o = {-0.5, 0};
e = {1.5, 0};
a = {0, 0};
b = {1, 0};
\[Epsilon] = 0.1;
Graphics[{
  Circle[b, \[Epsilon], {0, 180 Degree}],
  Line[{o, e}],
  Text["A", a, {0, 2}],
  Text["B", b, {0, 2}],
  Text["(", a],
  Text["]", b]
  }
 ]

enter image description here

This is just an illustrative example and I assume you can expand it to change the size, location, font, etc ...

$\endgroup$
8
$\begingroup$

Would a NumberLinePlot do the trick?

{a, b} = {7, 8}; eps = 0.05;
NumberLinePlot[{a < x <= b, b - eps < x < b + eps}, x, 
 Spacings -> {1, .3}, PlotStyle -> Directive[PointSize[Large]]]

enter image description here

$\endgroup$

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.