Datapoint label spacing
- To: mathgroup at smc.vnet.net
- Subject: [mg112457] Datapoint label spacing
- From: Chris Degnen <degnen at cwgsy.net>
- Date: Thu, 16 Sep 2010 05:59:30 -0400 (EDT)
Hi, Does anyone have suggestions on how to label datapoints so the labels are optimally placed, and not overlapping each other? (Example of the problem below.) I expect this will require a fair amount of coding, and thought maybe the graph utilities package could find some application here. I don't suppose there's a built-in function I've overlooked. Suggestions appreciated. data = Transpose[{RandomSample[Range[50], 20] + 20, RandomSample[Range[50], 20] + 20}]; plot = ListPlot[data, PlotRange -> {{0, 100}, {0, 100}}]; labels = Text[ToString[Round[#]], # + {0, 5}] & /@ plot[[1, 2, 1]]; plot[[1]] = Join[plot[[1]], labels]; plot