2
$\begingroup$

Do you have an idea how to show the points on the graph itself?

For example, if I have the plot below and I need to show the points on the curve, how to do that?

kappa = Sqrt[0.3458^2 + 0.4477^2];

 para = ParametricPlot[{kappa*Cos[a], kappa*Sin[a]}, {a, 0, Pi/2}, 
  PlotStyle -> {DotDashed, Thickness[0.007], Darker[Red]}]

Thanks in advance!

$\endgroup$
  • $\begingroup$ Recommendation to a new question poser: Do you see why your line defining kappa is irrelevant? Just put in the value and avoid the useless diversion of computing kappa. $\endgroup$ – David G. Stork Feb 5 at 6:24
1
$\begingroup$

Use Epilog

kappa = Sqrt[0.3458^2 + 0.4477^2];

para = ParametricPlot[{kappa*Cos[a], kappa*Sin[a]},
  {a, 0, Pi/2},
  PlotStyle -> {DotDashed, Thickness[0.007], Darker[Red]},
  Epilog -> {AbsolutePointSize[5],
    {Point[#], Text[NumberForm[#, {5, 2}], #,
        1.25 {Sign[#[[1]] - 0.4], -1}]} & /@
     Table[{kappa*Cos[a], kappa*Sin[a]},
      {a, 0, Pi/2, Pi/16}]}]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks a lot that is what I wanted(: $\endgroup$ – Ghady Feb 5 at 16:20
2
$\begingroup$

This is all in the Mesh:

ParametricPlot[
 {kappa*Cos[a], kappa*Sin[a]},
 {a, 0, Pi/2},
 PlotStyle -> {DotDashed, Thickness[0.007], Darker[Red]},
 Mesh -> All,
 MeshStyle -> Green
 ]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you! I meant how to show the numbers (ordered pairs) of these points or some of them on the graph. $\endgroup$ – Ghady Feb 5 at 0:46
  • $\begingroup$ Not entirely sure what you mean. Show what numbers how? I currently have the points the plot is constructed from styled in green. $\endgroup$ – b3m2a1 Feb 5 at 0:47
  • $\begingroup$ To get all of the points in the plot Extract[#, Most[Flatten[Position[#, Line]]]] &@para $\endgroup$ – Rohit Namjoshi Feb 5 at 1:05
  • $\begingroup$ Thanks! b3m2a1 and Rohit Namjoshi $\endgroup$ – Ghady Feb 5 at 16:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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