Labeling individual plot points using PlotMarkers
- To: mathgroup at smc.vnet.net
- Subject: [mg78569] Labeling individual plot points using PlotMarkers
- From: Nazdrovje <nazdrovje at gmail.com>
- Date: Wed, 4 Jul 2007 05:41:01 -0400 (EDT)
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?
- Follow-Ups:
- Re: Labeling individual plot points using PlotMarkers
- From: Brett Champion <brettc@wolfram.com>
- Re: Labeling individual plot points using PlotMarkers