Marker Attributes class
This class is used (in general by secondary inheritance)
by many other classes (graphics, histograms). It holds all the markers
attributes.
Marker attributes
The marker attributes are:
Marker color
The marker color is a color index (integer) pointing in the ROOT color
table.
The marker color of any class inheriting from
TAttMarker can
be changed using the method
SetMarkerColor and retrieved using the
method
GetMarkerColor.
The following table shows the first 50 default colors.
{
TCanvas *c = new TCanvas("c","Marker colors",0,0,500,200);
c.DrawColorTable();
return c;
}
Marker style
The Marker style defines the markers' shape.
The marker style of any class inheriting from
TAttMarker can
be changed using the method
SetMarkerStyle and retrieved using the
method
GetMarkerStyle.
The following list gives the currently supported markers (screen
and PostScript) style. Each marker style is identified by an integer number
(first column) corresponding to a marker shape (second column) and can be also
accessed via a global name (third column).
Marker number Marker shape Marker name
1 dot kDot
2 + kPlus
3 * kStar
4 o kCircle
5 x kMultiply
6 small scalable dot kFullDotSmall
7 medium scalable dot kFullDotMedium
8 large scalable dot kFullDotLarge
9 -->19 dot
20 full circle kFullCircle
21 full square kFullSquare
22 full triangle up kFullTriangleUp
23 full triangle down kFullTriangleDown
24 open circle kOpenCircle
25 open square kOpenSquare
26 open triangle up kOpenTriangleUp
27 open diamond kOpenDiamond
28 open cross kOpenCross
29 open star kOpenStar
30 full star kFullStar
{
TCanvas *c = new TCanvas("c","Marker types",0,0,500,200);
TMarker marker;
marker.DisplayMarkerTypes();
return c;
}
Marker size
Various marker sizes are shown in the figure below. The default marker size=1
is shown in the top left corner. Marker sizes smaller than 1 can be
specified. The marker size does not refer to any coordinate systems, it is an
absolute value. Therefore the marker size is not affected by any change
in TPad's scale.
The marker size of any class inheriting from
TAttMarker can
be changed using the method
SetMarkerSize and retrieved using the
method
GetMarkerSize.
Note that the marker styles number 1 6 and 7 (the dots), cannot be scaled. They
are meant to be very fast to draw and are always drawn with the same number of
pixels; therefore
SetMarkerSize does not apply on them. To have a
"scalable dot" a filled circle should be used instead, i.e. the marker style
number 20. By default (if
SetMarkerStyle is not specified), the marker
style used is 1. That's the most common one to draw scatter plots.