Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Datapoint label spacing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112479] Re: Datapoint label spacing
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 16 Sep 2010 06:56:29 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Use Tooltip

data = Transpose[{RandomSample[Range[50], 20] + 20, 
    RandomSample[Range[50], 20] + 20}];

ListPlot[Tooltip[data], PlotRange -> {{0, 100}, {0, 100}}]


Bob Hanlon

---- Chris Degnen <degnen at cwgsy.net> wrote: 

=============
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




  • Prev by Date: Re: Inconsistent behaviour of Integrate
  • Next by Date: Mathematica Hands-On Training Courses in Amsterdam
  • Previous by thread: Datapoint label spacing
  • Next by thread: Re: Generalizing Complement to handle multiple occurrences of