MathGroup Archive 2010

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

Search the Archive

Pass argument name to plot label

  • To: mathgroup at
  • Subject: [mg107794] Pass argument name to plot label
  • From: Adam <juneappal at>
  • Date: Fri, 26 Feb 2010 04:06:36 -0500 (EST)

I have 15 lists with semi-descriptive names.  I want to make a
function that builds a plot (histogram, actually) that has the
particular list name as a label.

Something like this:

hplot[list_] :=
 Histogram[list,   PlotLabel -> Row[{list, ", mean = ", Mean[list]}]]

When I run it, like so:
things = {1 , 2, 3};

I want the Plot Label to be displayed as:
"things, mean = 2"

Is this possible?  I have tried SymbolName[things], HoldForm[things],
ut either way, my plot label displays as:
{1, 2, 3} , mean = 2

  • Prev by Date: Re: Re: Date & Time format..
  • Next by Date: Size and Location of Opening Window
  • Previous by thread: Re: Problems with ChoiceDialog inside a Dynamic: Bug or not (well)
  • Next by thread: Re: Pass argument name to plot label