MathGroup Archive 2007

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

Search the Archive

Re: Labeling individual plot points using PlotMarkers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78611] Re: [mg78569] Labeling individual plot points using PlotMarkers
  • From: Brett Champion <brettc at wolfram.com>
  • Date: Thu, 5 Jul 2007 04:07:37 -0400 (EDT)
  • References: <200707040941.FAA08593@smc.vnet.net>

On Jul 4, 2007, at 4:41 AM , Nazdrovje wrote:

> I need to plot data measured by several subjects (using Mathematica  
> 6). For
> each subject (on the x-axis) I want to plot the maximum of a list of
> observations and I want to label it with the position in the list
> where this maximum value is reached. Getting these values is no
> problem, but the labelling part is. I know I could program the labels
> using Text or so with Epilog, but it looks so clumsy that I really
> hate to do it in this way. ListPlot should be able to do its own
> labeling, but it doesn't work for me. Since every dataset is just one
> point (one subject, one maximum), ListPlot should be called as:
>
> ListPlot[{{{1, 2}}, {{6, 9}}, {{7, 10}}}].
>
> The outer braces to indicate that various datasets follow, the next
> deeper {} to indicate the data set and the deepest {} to indicate a
> coordinate pair as opposed to single y-values. I get three points with
> different colors as expected. Leave out the second level of braces and
> they are considered the same data set and are colored the same. If I
> now add a PlotMarker option like this:
>
> ListPlot[{{{1, 2}}, {{6, 9}}, {{7, 10}}},  PlotMarkers -> {"\[Alpha]",
> "\[Beta]", "\[Gamma]"}]
>
> the results are unexpected. The first plotmarker is fine, but the
> second and third contain both the intended symbols and the first one
> combined. The following workaround yields the result I want, but it's
> really an ugly kludge:
>
> ListPlot[{{{1, 2}, {1, 2}}, {{6, 9}, {6, 9}}, {{7, 10}, {7, 10}}},
>  PlotMarkers -> {"\[Alpha]", "\[Beta]", "\[Gamma]"}]
>
> Anyone have a better idea to handle this? And is the overlapping
> behaviour a bug?

It's a bug that occurs when you have data sets that only contain a  
single point.

Brett Champion
Wolfram Research


  • Prev by Date: Re: Compiled function changes somehow.
  • Next by Date: Re: Book or Manual for 6?
  • Previous by thread: Labeling individual plot points using PlotMarkers
  • Next by thread: Re: Labeling individual plot points using PlotMarkers