3
$\begingroup$

Here is a sample code which plots two points

Clear["Global`*"];
pts = Point[1.45 ({Cos@#, Sin@#} & /@ {-Pi/2 + 1/2, 3 Pi/2 - 1/2})];
Graphics[pts]

This code is just a small part of a larger code, so its main structure and purpose should be remain the same. What I want is to change the plot marker so instead of two dots to print another symbol, let's say two five-pointed filled stars.

Any suggestions?

$\endgroup$
  • 2
    $\begingroup$ Use ‘ListPlot’ with option ‘PlotMarker’ $\endgroup$ – José Antonio Díaz Navas Nov 19 '17 at 19:48
  • 1
    $\begingroup$ text = Text["\[FivePointedStar]", 1.45 {Cos@#, Sin@#}] & /@ {-Pi/2 + 1/2, 3 Pi/2 - 1/2}; Graphics[text]? $\endgroup$ – kglr Nov 19 '17 at 20:38
3
$\begingroup$

Using Graphics and Text:

text = Text[Style["\[FivePointedStar]", 32, Red], 1.45 {Cos@#, Sin@#}] & /@ 
  {-Pi/2 + 1/2, 3 Pi/2 - 1/2};
Graphics[text, PlotRange -> All, AspectRatio -> 1/GoldenRatio, 
 Axes -> True, AxesOrigin -> {0, 0}, 
 Ticks -> (1.45 Through@{Cos, Sin}@{-Pi/2 + 1/2, 3 Pi/2 - 1/2})]

enter image description here

Using ListPlot and PlotMarkers:

ListPlot[1.45 {Cos@#, Sin@#} & /@ {-Pi/2 + 1/2, 3 Pi/2 - 1/2}, 
 PlotMarkers -> Style["\[FivePointedStar]", Red, 32], 
 PlotRange -> All, Axes -> True, AxesOrigin -> {0, 0},
 Ticks -> (1.45 Through@{Cos, Sin}@{-Pi/2 + 1/2, 3 Pi/2 - 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.