0

I have 3 lists, all with same length.

  • nameList ['hut','cow'...]
  • xPos ['30.5'...]
  • zPos ['111.8'....]

I wish to plot a point with the first entry from the two numerical lists. I do it like this:

 pl.plot(xPos,zPos, 'ko', markerfacecolor='red', markeredgecolor='black')

I would like some help on how I can add corresponding names to the points. For instance written slightly above the point/alternatively to the sides and then with a line to the point. Is it possible?

Jerry Coffin
  • 455,417
  • 76
  • 598
  • 1,067
krodil
  • 3
  • 7
  • 1
    Have a look at the annotate object (e.g. http://matplotlib.org/examples/pylab_examples/annotation_demo2.html) and loop over your points – Jakob Dec 16 '13 at 15:36
  • http://stackoverflow.com/questions/14938541/how-to-improve-the-label-placement-for-matplotlib-scatter-chart-code-algorithm/15859652#15859652 – tacaswell Dec 16 '13 at 16:51

0 Answers0