-1
$\begingroup$

This question already has an answer here:

I wrote this simple code for a basic plot (two lines):

Plot[{4, 0}, {x, -2, 2},   
 PlotStyle -> {{Red, Dashed, Thickness[0.004]}, {Red, Dashed, 
    Thickness[0.004]}}, PlotRange -> {-1, 6}]

Whose output is simply

enter image description here

I would like to insert a single point (and moreover, I would like that that point were clearly visible, quite marked) for example the point $P = (1, 4)$ on the red higher line.

How can I do that?

$\endgroup$

marked as duplicate by Yves Klett, march, Öskå, Karsten 7., Verbeia Dec 10 '15 at 1:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5
$\begingroup$
Plot[{4, 0}, {x, -2, 2},
 Epilog -> {Blue, PointSize@Large, Point[{1, 4}]},
 PlotStyle -> {{Red, Dashed, Thickness[0.004]}, {Red, Dashed, Thickness[0.004]}},
 PlotRange -> {-1, 6}]

enter image description here

$\endgroup$
  • $\begingroup$ Awesome again! Easy and fast, thank you so much! $\endgroup$ – Henry Dec 9 '15 at 20:58
8
$\begingroup$

Another option is to use Show and Graphics, as in

p = Plot[{4, 0}, {x, -2, 2},PlotStyle -> {{Red, Dashed, Thickness[0.004]}, {Red, Dashed, 
      Thickness[0.004]}}, PlotRange -> {-1, 6}];
g = Graphics[{PointSize[Large], Blue, Point[{1, 4}]}];
Show[p, g]

Mathematica graphics

$\endgroup$

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