MathGroup Archive 2009

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

Search the Archive

question on passing arguments in a function within BarChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100487] question on passing arguments in a function within BarChart
  • From: Ramiro <ramiro.barrantes at gmail.com>
  • Date: Fri, 5 Jun 2009 03:04:06 -0400 (EDT)

Hello,

I am trying to use the ChartElementFunction within BarChart to draw
some special error bars.

The following is a step in the right direction and it works:

g[{{xmin_, xmax_}, {ymin_, ymax_}}, values_,
  meta_] := {Polygon[{{xmin, ymin}, {xmax, ymin}, {xmax, ymax}, {xmin,
      ymax}}], {Thickness[0.005], Black,
   Line[{{(xmin + xmax)/2, ymin}, {(xmin + xmax)/2, ymax}}]}}
BarChart[{1, 2, 3}, ChartElementFunction -> g]

I am not sure where g is getting the coordinates from but it does, but
now I would like to include the metadata: the actual values that I
will use for the error bars, however, I am not sure how to pass that
argument (i.e.  ChartElementFunction->g[???] ) .  Any suggestions?

Ramiro


  • Prev by Date: Re: Documentation
  • Next by Date: Re: Problem with a plot in Mathematica
  • Previous by thread: Re: ContourPlot3D and NIntegrate
  • Next by thread: Re: creating an array in a loop