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

MathGroup Archive 2008

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

Search the Archive

Re: Labeling points


The visual system notices area, not diameter, so if you want the
subjective size of each point to be proportional to the third value
in each element of data you should use  PointSize[Sqrt[Last[#]]/50]
instead of  PointSize[Last[#]/50].

On May 19, 3:23 am, anglew... at yahoo.com wrote:
> Thanks all, great help! Combining them, here's what I wound up with:
>
> (* Custom LabeledListPlot *)
> LabeledListPlot[data_] :=
>   Show[Graphics[{PointSize[Last[#]/50], Point[Take[#, 2]],
>                  Text[ToString[Round[100 Last[#]]] <> "%",
>                       Take[#, 2], {-1.5, 0}]} & /@ data],
>        Axes -> True, AxesOrigin -> {0, 0}, AspectRatio -> 1,
>        AxesLabel -> {"Shots", "Damage"}];
>
> (* Data supplied by other routines *)
> data = {{1, 1, 0.5`1.9999999999999998},
>         {2, 1, 0.75`2.0000000000000004},
>         {2, 2, 0.25`1.9999999999999998},
>         {3, 1, 0.875`2.0000000000000013},
>         {3, 2, 0.5`1.9999999999999998},
>         {3, 3, 0.125`1.9999999999999998},
>         {4, 1, 0.9375`2.0000000000000004},
>         {4, 2, 0.6875`2.},
>         {4, 3, 0.3125`1.9999999999999998},
>         {4, 4, 0.0625`1.9999999999999998},
>         {5, 1, 0.96875`1.9999999999999991},
>         {5, 2, 0.8125`2.000000000000002},
>         {5, 3, 0.5`1.9999999999999998},
>         {5, 4, 0.1875`2.0000000000000004},
>         {5, 5, 0.03125`1.9999999999999998},
>         {6, 1, 0.984375`2.0000000000000004},
>         {6, 2, 0.890625`2.0000000000000004},
>         {6, 3, 0.65625`1.9999999999999998},
>         {6, 4, 0.34375`2.},
>         {6, 5, 0.109375`2.0000000000000013},
>         {6, 6, 0.015625`1.9999999999999998}};
>
> LabeledListPlot[data]


  • Prev by Date: URL button on Documentation Center pages
  • Next by Date: Re: Implementing a array assignment for custom data structure
  • Previous by thread: Re: Labeling points
  • Next by thread: Re: Labeling points