Re: ListPlot and Tooltip
- To: mathgroup at smc.vnet.net
- Subject: [mg94038] Re: ListPlot and Tooltip
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 2 Dec 2008 05:21:07 -0500 (EST)
- Organization: Uni Leipzig
- References: <gh2h0d$i60$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, Show @@ MapThread[ ListPlot[#1, Joined -> True, Frame -> True] /. l_Line :> Tooltip[l, #2] & , {data, names}] ?? Regards Jens Hugh Goyder wrote: > I have several sets of data which I plot together using ListPlot. In > order to distinguish the data I attempted to use Tooltip. I give some > example data below and find that Tooltip does not work. Am I doing > something wrong? Is there an alternative method for making Tooltip > operate. Surprisingly it works when I use ListLogPlot. I am using V7 > with Windows. > > Regards > > Hugh Goyder > > data = Table[ > Table[E^(- a t), {t, 0, 100, 1}], > {a, {0.001, 0.002, 0.005, 0.01, 0.02, 0.05}}]; > > names = {"run01", "run02", "run03", "run04", "run05", "run06"}; > > ListPlot[Table[Tooltip[data[[i]], names[[i]]], {i, Length[data]}], > Joined -> True, Frame -> True] > > ListLogPlot[Table[Tooltip[data[[i]], names[[i]]], {i, Length[data]}], > Joined -> True, Frame -> True] >