Skip to main content
2 of 2
added 413 characters in body
bill s
  • 69.7k
  • 4
  • 103
  • 198

Another, fairly general way to approach this is to discretize the plot into points, which can then be controlled at will. For example, with the OPs Sine function:

data = Table[{x, Sin[x]}, {x, 0, 3 Pi, 0.01}]; 
Graphics[Point[data]]

enter image description here

To vary the size of the individual points:

allPointsSize = Table[{PointSize[data[[i, 1]]/300], 
                       Point[data[[i]]]}, {i, 1, Length[data]}];
Graphics[allPointsSize]

enter image description here

To vary both the size and color:

allPointsColor = Table[{PointSize[data[[i, 1]]/300], 
                 Hue[i/Length[data]],  Point[data[[i]]]}, {i, 1, Length[data]}];
Graphics[allPointsColor]

enter image description here

Applying this to Halirutan's parametric swirl function:

swirl = Table[{Sin[t] + 2 Sin[2 t], Cos[t] - 2 Cos[2 t]}, {t, 0, 3 Pi, 0.01}];
allPointsSwirl = Table[{PointSize[100 Abs[swirl[[i, 1]]]/Length[swirl]], 
       Hue[i/Length[swirl]], Point[swirl[[i]]]}, {i, 1, Length[swirl]}];
Graphics[allPointsSwirl]

enter image description here

bill s
  • 69.7k
  • 4
  • 103
  • 198