From: Murta on
Hello All

There is really no way to do a simple gradient fill inside a disk
in Mathematica?
I'm working in a BubbleChart, and would like to make a graphics
disk using ChartElements, going to color x to transparent using
opacity.
I get surprised to see that there is no way to work with gradient
fill inside primitives like Disk.. there is really this?
If it's true, please, correct it in Mathematica 8!...

From: David Park on
Here is a solution using Presentations. You should also be able to do this
using RegionPlot, Show and some graphics level jumping.

Needs["Presentations`Master`"]

gradientDisk::usage =
"gradientDisk[{xcenter, ycenter}, radius, color] will draw an \
outlined colored disk with the color blended from White to full color \
across the the horizontal dimension.";
SyntaxInformation[
gradientDisk] = {"ArgumentsPattern" -> {{_, _}, _, _}};
gradientDisk[{xcenter_, ycenter_}, radius_, color_] :=
{RegionDraw[(x - xcenter)^2 + (y - ycenter)^2 < radius^2, {x,
xcenter - radius, xcenter + radius}, {y, ycenter - radius,
ycenter + radius},
ColorFunctionScaling -> False,
ColorFunction ->
Function[{x, y},
Blend[{White, color},
Rescale[x, {xcenter - radius, xcenter + radius}]]]],
AbsoluteThickness[1],
Circle[{xcenter, ycenter}, radius]}

Draw2D[
{gradientDisk[{0, 0}, 1, Red],
gradientDisk[{2, 2}, 1/2, Green],
gradientDisk[{-2, 1}, .45, Blue]},
Frame -> True,
PlotRange -> 4
]


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/



From: Murta [mailto:rodrigomurtax(a)gmail.com]

Hello All

There is really no way to do a simple gradient fill inside a disk
in Mathematica?
I'm working in a BubbleChart, and would like to make a graphics
disk using ChartElements, going to color x to transparent using
opacity.
I get surprised to see that there is no way to work with gradient
fill inside primitives like Disk.. there is really this?
If it's true, please, correct it in Mathematica 8!...