MathGroup Archive 2012

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

Search the Archive

Re: Markers in list plot

  • To: mathgroup at
  • Subject: [mg128356] Re: Markers in list plot
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Tue, 9 Oct 2012 00:39:07 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Hi All,
i would like to put personal PlotMarkers in ListPlot in the following way:


in such a way that the first point has as a marker number one, the second number two and so on.. is that possible?

Thanks in advance!

Hi, Daniel,

You explained it not quite clearly. Bob Hanlon understood that you need a number in the place of each point (see here
However, I see also another way to understand you. Namely, that you need each point to de shown by its own marker.

If this what you want, a very simple way is to add the second parentheses around each pair of numbers. That is, if you have a list like this: {{1,2},{3,4},...} you should have {{{1,2}}, {{3,4}},...}. Then you simply plot it with the option PlotMarkers->Automatic. Otherwise you may specify the markers yourself and use them.

To be specific, assume that this is your list (evaluate it):

points = Transpose[{Range[5], RandomReal[{0, 3}, 5]}];

The following adds the parentheses:

doubleParenthesesList = List /@ points;

and this draws the plot:

ListPlot[doubleParenthesesList, PlotMarkers -> Automatic]

For an idea of making custom markers, have a look here and play with its parameters:

vertexDownOpenTriangle =
  Graphics[{EdgeForm[Directive[Thick, Purple]], White,
    Polygon[{{1, 0}, {0, -Sqrt[3]}, {-1, 0}}]}, ImageSize -> 7];

hexagonFilled =
    Polygon[Table[{Cos[2 \[Pi] k/6], Sin[2 \[Pi] k/6]}, {k, 0, 5}]]},
   ImageSize -> 7];
hexagonOpen =
  Graphics[{EdgeForm[Directive[Thick, Pink]], White,
    Polygon[Table[{Cos[2 \[Pi] k/6], Sin[2 \[Pi] k/6]}, {k, 0, 5}]]},
   ImageSize -> 7];

diamondFilled =
  Graphics[{Red, Polygon[Table[{Cos[Pi k/2], Sin[Pi k/2]}, {k, 4}]]},
   ImageSize -> 7];
diamondOpen =
  Graphics[{EdgeForm[Directive[Thick, Red]], White,
    Polygon[Table[{Cos[Pi k/2], Sin[Pi k/2]}, {k, 4}]]},
   ImageSize -> 7];

 PlotMarkers -> {vertexDownOpenTriangle, hexagonFilled, hexagonOpen,
   diamondFilled, diamondOpen}]

Like this you can do whatever you like as the markers.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at

  • Prev by Date: Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • Next by Date: Re: Locator + EventHandler
  • Previous by thread: Re: Markers in list plot
  • Next by thread: Animations in Graphs