I have the following color table:
colTable =
{{Black}, Table[{Blend[{Blue, Green, Yellow, Red}, x]}, {x, 1/2000, 1, 1/2000}]};
colTable = Flatten[colTable];
I can color a list plot curve when the plot is joined, but not the plot markers when the plot is not joined.
The following code
plot = ListPlot[coordinates*dx,
ColorFunction -> (Blend[colTable, #] &), Joined -> True,
Frame -> True, PlotRange -> {{0, 130*dx}, {0, 130*dx}},
PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.002]},
AspectRatio -> 1,
FrameLabel -> {{"y in mm", ""}, {"x in mm", imageDir}},
BaseStyle -> {FontWeight -> "Bold", FontSize -> 30,
FontFamily -> "Calibri"}, ImageSize -> 2000];
gives
Buy when drawing only the markers with this code
plot = ListPlot[coordinates*dx,
ColorFunction -> (Blend[colTable, #] &), Joined -> False,
Frame -> True, PlotMarkers -> Automatic,
PlotRange -> {{0, 130*dx}, {0, 130*dx}},
PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.002]},
AspectRatio -> 1,
FrameLabel -> {{"y in mm", ""}, {"x in mm", imageDir}},
BaseStyle -> {FontWeight -> "Bold", FontSize -> 30,
FontFamily -> "Calibri"}, ImageSize -> 2000];
I get:
What am I doing wrong?
With the help example from – J. M.♦ I get now the correct image below for plot markers, when using the following code:
plot = ListPlot[MapThread[Style, {coordinates*dx, colTable}],
PlotStyle -> AbsolutePointSize[15], Frame -> True,
PlotRange -> {{0, 130*dx}, {0, 130*dx}}, AspectRatio -> 1,
FrameLabel -> {{"y (mm)", ""}, {"x (mm)", imageDir}},
BaseStyle -> {FontWeight -> "Bold", FontSize -> 30,
FontFamily -> "Calibri"}, ImageSize -> 2000];
By the way I have used this same color table and superposed corresponding images (I did not mention that the data are center of mass coordinates of circular shaped objects in CMOS images). Here I get the following image which corresponds to the plot with the markers:
Question: The color table is the same for the joined data points (curve, see top plot) and for the plot markers. So I would assume for the curve at top the same color variation. But it is not the case?