MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Primitive Disk Gradient Fills in Graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110987] Re: Primitive Disk Gradient Fills in Graphics
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Fri, 16 Jul 2010 05:15:57 -0400 (EDT)

Hi again,

> I don't think one has to Unprotect ChartElementData. At least, I had no
> problem. Here is an example of getting out these primitives and using them
> in your own custom plot.

what I meant was, that there is here (Linux 64, Mathematica 7.0.1) no direct
documentation of ChartElementData. Unprotecting (read protection) the
symbol and using ?? for looking at the definition was the way I found
out about the usage.
Of course you can use it without unprotecting the symbol.

Cheers
Patrick


> The possible types of primitives for BubbleChart:
> 
> ChartElementData["BubbleChart"] 
> 
> {"Bubble", "FadingBubble", "GradientBubble", "MarkerBubble", \
> "NoiseBubble", "OscillatingBubble", "PolyhedronBubble", \
> "SphereBubble", "SquareWaveBubble", "TriangleWaveBubble"} 
> 
> Examine one of these with Manipulate.
> 
> ChartElementData["SquareWaveBubble", "Manipulate"] 
> 
> Insert a specific case to see the form of the function.
> 
> ChartElementDataFunction["SquareWaveBubble", "AngularFrequency" -> 20,
>   "RadialAmplitude" -> 0.1`] 
> 
> Now design a custom primitive. This one specifies the location, size and
> color for a SquareWaveBubble. The RadialAmplitude varies with the size.
> (Look up ChartElementFunction for more details.)
> 
> myBubble[x_, y_, size_, color_] := {color, 
>   ChartElementDataFunction["SquareWaveBubble", 
>     "AngularFrequency" -> 20, 
>     "RadialAmplitude" :> Rescale[size, {.2, 3}, {1, 0}]][{{x - size/2,
>       x + size/2}, {y - size/2, y + size/2}}, {x, y}]} 
> 
> Here is some data and a plot done outside of BubbleChart.
> 
> data = Table[{RandomReal[{-10, 10}], RandomReal[{-10, 10}], 
>     s = RandomReal[{.2, 3}], 
>     ColorData["DarkRainbow"][Rescale[s, {.2, 3}]]}, {i, 15}];
> Graphics[
>  {myBubble @@@ data},
>  AspectRatio -> Automatic,
>  Frame -> True,
>  PlotRange -> 13] 
> 
> However, this does depend on having an Automatic AspectRatio.
> 
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> From: Patrick Scheibe [mailto:pscheibe at trm.uni-leipzig.de] 
> 
> 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:
> > 
> > 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 at comcast.net
> > http://home.comcast.net/~djmpark/  
> > 
> 



  • Prev by Date: Re: Accessing static members with J/Link
  • Next by Date: Re: Primitive Disk Gradient Fills in Graphics
  • Previous by thread: Re: Primitive Disk Gradient Fills in Graphics
  • Next by thread: Re: Primitive Disk Gradient Fills in Graphics