3
$\begingroup$

I have an Excel spreadsheet with numbers on two columns and names in a 3rd. I would like to plot a 2d graph of the first 2 columns and see the respective name from the 3rd column as a tooltip.

I understand how to create the 2d graph and how to create tooltips but not how to tell Mathematica that the 3rd column is essentially labelling the first two and for it to show me those names when I hover over each point. Is it possible?

$\endgroup$
  • $\begingroup$ You could also consider including some sample data which will make answering more comfortable. $\endgroup$ – Yves Klett Feb 22 '14 at 20:25
5
$\begingroup$

Starting with some test data one way is to map the 3 entries onto a list of Tooltips:

data = {{1, 7, "Heigh-ho,"}, {2, 9, "Heigh-ho"}, {3, 10, "It's"}, {4, 
    8, "home"}, {5, 7, "from"}, {6, 4, "work"}, {7, 1, "we"}, {8, 2, 
    "go"}};

tipdata = Tooltip[{#[[1]], #[[2]]}, #[[3]]] & /@ data;

ListPlot[tipdata, PlotMarkers -> {Automatic, Medium}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ @Dieter you´re welcome! $\endgroup$ – Yves Klett Feb 22 '14 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.