From: Patrick Scheibe on
Hi all,

just clear the protection attributes of ChartElementData and find out
that

ChartElementData["GradientBubble", "Manipulate"]

should help.

Cheers
Patrick

On Thu, 2010-07-15 at 03:10 -0400, David Park wrote:
> Well, darn if there isn't a method for doing that within BubbleChart.
> Evaluate
>
> ChartElementData["BubbleChart"]
>
> {Bubble,FadingBubble,GradientBubble,MarkerBubble,NoiseBubble,OscillatingBubb
> le,PolyhedronBubble,SphereBubble,SquareWaveBubble,TriangleWaveBubble}
>
> for the various types of bubbles. Then, for example:
>
> BubbleChart[RandomReal[1, {10, 3}],
> ChartStyle -> "Pastel",
> ChartElementFunction -> "GradientBubble"]
>
> But how would we obtain different colors for the bubbles, say based on the
> radius? I don't know where we can feed it in.
>
> Instead of starting with high level, "set-piece" plot types, and then trying
> to screw them around with convoluted options, it would be much easier to
> start with primitives and build up the higher level plot types.
>
> Suppose I want a bubble fading from White to a color at the rim, and I want
> different colors depending on the radius of the bubble? Here is an easy way
> to build it up.
>
> Needs["Presentations`Master`"]
>
> First define the primitive.
>
> gradientDisk::usage =
> "gradientDisk[{xcenter, ycenter}, radius, color] will draw an \
> outlined disk with the color blended from White to full color across \
> the radius.";
> 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[Sqrt[(x - xcenter)^2 + (y - ycenter)^2], {0, radius}]]]],
> AbsoluteThickness[1],
> Circle[{xcenter, ycenter}, radius]}
>
> Adapt it to the WRI form of Bubble data with a particular color selection
> for the bubbles.
>
> myBubble[{x_, y_, r_}] :=
> gradientDisk[{x, y}, r, ColorData["SolarColors"][Rescale[r, {0, 2}]]]
>
> Then draw the bubble chart.
>
> data = Array[{RandomReal[{-10, 10}], RandomReal[{-10, 10}],
> RandomReal[{0.1, 2}]} &, 20];
> Draw2D[
> {myBubble /@ data},
> Frame -> True,
> ImageMargins -> 5,
> PlotRange -> 12
> ]
>
> Also, since WRI must have defined a primitive for SquareWaveBubble, say, how
> could we obtain direct access to it? (I know how to program one but since
> WRI has done, and buried, the work how about getting it out?)
>
>
> David Park
> djmpark(a)comcast.net
> http://home.comcast.net/~djmpark/
>
>
>
>
>
> From: M.Roellig [mailto:markus.roellig(a)googlemail.com]
>
> On 13 Jul., 11:28, Murta <rodrigomur...(a)gmail.com> wrote:
> > 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!...
>
> Hi,
>
> I agree, GradientFill would be nice, as well as TextureFill or any filling
> with arbitrary patterns. Until then you can try to construct it by yourself:
>
> GradientDisk[] :=
> Graphics[Table[{Hue[r], Circle[{0, 0}, r]}, {r, 0, 1, 0.001}]] ;
> BubbleChart[RandomReal[1, {10, 3}], ChartElements -> {GradientDisk[]}]
>
> or
>
> BWGradientDisk[] :=
> Graphics[Table[{GrayLevel[r], Circle[{0, 0}, r]}, {r, 0, 1,
> 0.001}]];
> BubbleChart[RandomReal[1, {10, 3}],
> ChartElements -> {BWGradientDisk[]}]
>
> This takes quite some time, since many Circles are drawn. If somebody knows
> how to rasterize a circly without getting square image borders, one
> could use the rasterized image as Element. Maybe exporting to gif
> with transparent white background works.
>
> Of course, the same excercise also works with Rectangles etc..
>
>
> Cheers,
>
> Markus
>
>
>


From: Murta on
Good idea..!
Can you send the code of how I do that?
It's very interesting to underastand the proprieties.
tks
Rodrigo Murta

On Jul 16, 6:19 am, Patrick Scheibe <psche...(a)trm.uni-leipzig.de>
wrote:
> Hi all,
>
> just clear the protection attributes of ChartElementData and find out
> that
>
> ChartElementData["GradientBubble", "Manipulate"]
>
> should help.
>
> Cheers
> Patrick

From: Syd Geraghty on
Hi David,

> ChartElementData["SquareWaveBubble", "Manipulate"]

gives a very interesting result but as far as I can find both ChartElementData
& the Manipulate option are undocumented.

Is this available with documentation in a Developer Version of Mathematica by chance?


Cheers .... Syd

Syd Geraghty B.Sc, M.Sc.

sydgeraghty(a)mac.com

Mathematica 7.0.1.0 for Mac OS X x86 (64 - bit) (12th September 2009)
MacOS X V 10.6.1 Snow Leopard
MacBook Pro 2.33 GHz Intel Core 2 Duo 2GB RAM


On Jul 16, 2010, at 2:15 AM, David Park wrote:

> Examine one of these with Manipulate.
>
> ChartElementData["SquareWaveBubble", "Manipulate"]