Skip to main content
Added possibly missing ResourceFunction call
Source Link
MarcoB
  • 67.7k
  • 18
  • 96
  • 198
data = {Table[{x, 1 + 2 x}, {x, 0, 5, 1}], 
   Table[{x, 1 + x}, {x, 0, 5, 1}]};

colors = {Blue, Red};

markers = MapThread[
 First @ ["PolygonMarker"][#ResourceFunction["PolygonMarker"][#, {Offset[7], 0}, {EdgeForm[#2], FaceForm[White]}]&,
 {{"Circle", "ThreePointedStar"}, colors}];

Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], 
   EdgeForm[{colors[[i]], AbsoluteThickness[2], JoinForm["Miter"]}], 
   Translate[markers[[i]], #] & /@ If[i == 1, data[[i]], Rest[data[[i]]]]}, 
  {i, Length[data]}], 
 AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

enter image description here

data = {Table[{x, 1 + 2 x}, {x, 0, 5, 1}], 
   Table[{x, 1 + x}, {x, 0, 5, 1}]};

colors = {Blue, Red};

markers = MapThread[
 First @ ["PolygonMarker"][#, {Offset[7], 0}, {EdgeForm[#2], FaceForm[White]}]&,
 {{"Circle", "ThreePointedStar"}, colors}];

Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], 
   EdgeForm[{colors[[i]], AbsoluteThickness[2], JoinForm["Miter"]}], 
   Translate[markers[[i]], #] & /@ If[i == 1, data[[i]], Rest[data[[i]]]]}, 
  {i, Length[data]}], 
 AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

enter image description here

data = {Table[{x, 1 + 2 x}, {x, 0, 5, 1}], 
   Table[{x, 1 + x}, {x, 0, 5, 1}]};

colors = {Blue, Red};

markers = MapThread[
 First @ ResourceFunction["PolygonMarker"][#, {Offset[7], 0}, {EdgeForm[#2], FaceForm[White]}]&,
 {{"Circle", "ThreePointedStar"}, colors}];

Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], 
   EdgeForm[{colors[[i]], AbsoluteThickness[2], JoinForm["Miter"]}], 
   Translate[markers[[i]], #] & /@ If[i == 1, data[[i]], Rest[data[[i]]]]}, 
  {i, Length[data]}], 
 AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

enter image description here

Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

data = {Table[{x, 1 + 2 x}, {x, 0, 5, 1}], 
   Table[{x, 1 + x}, {x, 0, 5, 1}]};

colors = {Blue, Red};

markers = MapThread[
 First @ ["PolygonMarker"][#, {Offset[7], 0}, {EdgeForm[#2], FaceForm[White]}]&,
 {{"Circle", "ThreePointedStar"}, colors}];

Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], 
   EdgeForm[{colors[[i]], AbsoluteThickness[2], JoinForm["Miter"]}], 
   Translate[markers[[i]], #] & /@ If[i == 1, data[[i]], Rest[data[[i]]]]}, 
  {i, Length[data]}], 
 AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

enter image description here