Serych Jakub
2009-04-27 09:25:30 UTC
Dear Mathematica users,
first let me thank you for many nice zigzag solutions from my previous post.
Today I have another question. I need to highlight some data points in
ListPlot by changing their color. How to do it? I tried the similar solution
which somebody have sent me time ago for the same problem which I had with
Plot, but it doesn't work with ListPlot.
In the example below I'm trying to make the zero points Red and all other
Blue.
ListPlot[{9, 4, 1, 0, 0, 0, 1, 4, 9}, Filling -> Axis,
PlotStyle -> PointSize[0.02],
ColorFunction -> (If[# == 0, RGBColor[1, 0, 0], RGBColor[0, 0, 1]] &)]
Thanks in advance for any help
Jakub
first let me thank you for many nice zigzag solutions from my previous post.
Today I have another question. I need to highlight some data points in
ListPlot by changing their color. How to do it? I tried the similar solution
which somebody have sent me time ago for the same problem which I had with
Plot, but it doesn't work with ListPlot.
In the example below I'm trying to make the zero points Red and all other
Blue.
ListPlot[{9, 4, 1, 0, 0, 0, 1, 4, 9}, Filling -> Axis,
PlotStyle -> PointSize[0.02],
ColorFunction -> (If[# == 0, RGBColor[1, 0, 0], RGBColor[0, 0, 1]] &)]
Thanks in advance for any help
Jakub