0

How can I mix styles with some lines with filled and non-filled markers?
The post here mentioned all cases but I couldn't combine them into one plot.

(*Load the package code*)
package = 
  Import["http://raw.github.com/AlexeyPopkov/PolygonPlotMarkers/\
master/PolygonPlotMarkers.m", "Text"];

(Install the package (existing file will be overwritten!)) Export[FileNameJoin[{$UserBaseDirectory, "Applications", "PolygonPlotMarkers.m"}], package, "Text"]; Needs["PolygonPlotMarkers`"] data = Table[{x, BesselJ[k, x]}, {k, 0, 4}, {x, 0, 10, 0.5}]; markers = {"Circle", "ThreePointedStar", "FourPointedStar", "FivePointedStar", "Circle"}; colors = {Blue, Red, Darker@Green, Darker@Yellow, Orange}; Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], EdgeForm[{colors[[i]], AbsoluteThickness[1], JoinForm["Miter"]}], PolygonMarker[markers[[i]], Offset[7], data[[i]]]}, {i, Length[data]}], AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

enter image description here

I tried this but it didn't work.

(*Load the package code*)
package = 
  Import["http://raw.github.com/AlexeyPopkov/PolygonPlotMarkers/\
master/PolygonPlotMarkers.m", "Text"];

(Install the package (existing file will be overwritten!)) Export[FileNameJoin[{$UserBaseDirectory, "Applications", "PolygonPlotMarkers.m"}], package, "Text"]; Needs["PolygonPlotMarkers`"] data = Table[{x, BesselJ[k, x]}, {k, 0, 4}, {x, 0, 10, 0.5}]; markers = {"Circle", "ThreePointedStar", "FourPointedStar", "FivePointedStar", "Circle"}; colors = {Blue, Red, Darker@Green, Darker@Yellow, Orange}; Graphics[Table[{colors[[i]], Line[data[[i]]], FaceForm[White], EdgeForm[{colors[[i]], AbsoluteThickness[1], JoinForm["Miter"]}], PolygonMarker[markers[[i]], Offset[7], data[[i]], {Dynamic@EdgeForm[{CurrentValue["Color"], Opacity[1]}], Dynamic@FaceForm@Lighter[CurrentValue["Color"], 0.75]}]}, {i, Length[data]}], AspectRatio -> 1/2, ImageSize -> 450, Frame -> True]

hana
  • 2,388
  • 5
  • 19
  • What is the role of Dynamic in your attempted code? Also, what would you like to achieve? Which markers would you like to be filled, and which ones should be hollow? – MarcoB Jun 24 '22 at 19:57
  • @MarcoB I copied it from the linked page. I think it's to get the color to fill. Any lines are filled are okay as this is just an example. – hana Jun 24 '22 at 19:59
  • 1
    It may be as simple as just removing the FaceForm[White] portion from the code you posted, and it might work. Note that PolygonMarker should really be ResourceFunction["PolygonMarker"] if you are using the version of this code posted on the Wolfram Function Repository. – MarcoB Jun 24 '22 at 20:14

0 Answers0