Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table in the following format: Apple 2 Pear 3 Banana 5 Orange 6.5 .... I would like to put the values on a single horizontal axis and add corresponding descriptive labels (apple, pear, banana etc.) next to the values. How can I do that in Mathematica? Many thanks!

share|improve this question
You may want to look up BarChart. – Jens Jul 2 '13 at 5:26
What do you mean by put the values on a single horizontal axis? It sound like you want a dot on a line with a label. That's not the BarChart Jens suggested. Could you be a little bit more specific? – Sjoerd C. de Vries Jul 2 '13 at 5:48

From a list like ls = {{"Apple", 2} , {"Pear", 3}, {"Banana", 5}, {"Orange", 6.5}} you can get:

ListPlot[Labeled[{#[[2]], 0},Framed[Rotate[#[[1]], 90 Degree],
Background -> Yellow], Top] & /@ ls, Axes -> {True, False}]


share|improve this answer

Another possibility is to do it yourself:

ls = {{"Apple", 2}, {"Pear", 3}, {"Banana", 5}, {"Orange", 6.5}};
  {Text[Style[First@#, 18], {Last@#, 0.25}],
     Disk[{Last@#, 0.1}, .05]} & /@ ls,
 Axes -> { True, False}]

single axis diagram

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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