Pass argument name to plot label
- To: mathgroup at smc.vnet.net
- Subject: [mg107794] Pass argument name to plot label
- From: Adam <juneappal at gmail.com>
- 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}; hplot[things] 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