3
$\begingroup$

Is it possible to add to the Mesh points in a ParametricPlot the x-values in sort of a Callout-style way? E.g. on the following simple function:

ParametricPlot[{Sin@x, .3 Log@(x^2)}, {x, 0, 10}, Mesh -> 20]

The points are on the plot (a little small), now there should be the x values (0,0.5,1,1.5,...) indicated next to the points, as said in form of as it is produced with Callout.

$\endgroup$
  • $\begingroup$ This might help: link $\endgroup$ – K.J. Nov 20 '18 at 15:04
6
$\begingroup$
pp = ParametricPlot[{Sin@x, .3 Log@(x^2)}, {x, 0, 10}, 
   Mesh -> {Subdivide[0, 10, 20]}, MeshStyle -> PointSize[Large]];
points = Cases[Normal[pp], Point[x_] :> x, ∞];
Show[pp, ListPlot[Callout[#, #2] & @@@ 
  Transpose[{SortBy[points, Last], N @ Rest@Subdivide[0, 10, 20]}]], ImageSize -> 400]

enter image description here

Also

ParametricPlot[{Sin@x, .3 Log@(x^2)}, {x, 0, 10}, 
 Epilog -> ListPlot[Callout[{##2}, #] & @@@ 
   Table[N@{x, Sin@x, .3 Log @ (x^2)}, {x, Subdivide[0, 10, 20]}], 
  PlotStyle -> PointSize[Large]][[1]]]

enter image description here

$\endgroup$
5
$\begingroup$

Using Epilog

ParametricPlot[{Sin@x, .3 Log@(x^2)}, {x, 0, 10}, 
 Epilog -> {AbsolutePointSize[4], 
    {Text[N[#], pt = {Sin@#, .3 Log@(#^2)}, {0, If[IntegerQ[#], -2, 2]}], 
      Red, Point[pt]} & /@ Range[1/2, 10, 1/2]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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