Stata 15 help for marker_options

[G-3] marker_options -- Options for specifying markers


marker_options Description ------------------------------------------------------------------------- msymbol(symbolstyle) shape of marker mcolor(colorstyle) color and opacity of marker, inside and out msize(markersizestyle) size of marker

msangle(anglestyle) angle of marker symbol

mfcolor(colorstyle) inside or "fill" color and opacity

mlcolor(colorstyle) outline color and opacity mlwidth(linewidthstyle) outline thickness mlalign(linealignmentstyle) outline alignment (inside, outside, center) mlstyle(linestyle) thickness and color, overall style of outline

mstyle(markerstyle) overall style of marker; all settings above pstyle(pstyle) overall plot style, including markerstyle

recast(newplottype) advanced; treat plot as newplottype ------------------------------------------------------------------------- All options are rightmost; see repeated options.

One example of each of the above is

msymbol(O) mfcolor(red) mlcolor(olive) mstyle(p1) mcolor(green) mlwidth(thick) mlstyle(p1) msize(medium) mlalign(inside) msangle(0)

Sometimes you may specify a list of elements, with the first element applying to the first variable, the second to the second, and so on. See, for instance, [G-2] graph twoway scatter. One example would be

msymbol(O o p) mcolor(green blue black) msize(medium medium small) msangle(0 15 30)

mfcolor(red red none)

mlcolor(olive olive green) mlwidth(thick thin thick) mlalign(inside outside center)

mstyle(p1 p2 p3) mlstyle(p1 p2 p3)

For information about specifying lists, see [G-4] stylelists.


Markers are the ink used to mark where points are on a plot. The important options are

msymbol(symbolstyle) (choice of symbol) mcolor(colorstyle) (choice of color and opacity) msize(markersizestyle) (choice of size)


msymbol(symbolstyle) specifies the shape of the marker and is one of the more commonly specified options. See [G-4] symbolstyle for more information on this important option.

mcolor(colorstyle) specifies the color and opacity of the marker. This option sets both the color of the line used to outline the markers shape and the color of the inside of the marker. Also see options mfcolor() and mlcolor() below. See [G-4] colorstyle for a list of color choices.

msize(markersizestyle) specifies the size of the marker. See [G-4] markersizestyle for a list of size choices.

msangle(anglestyle) specifies the angle of the marker symbol. See [G-4] anglestyle for a list of angle choices.

mfcolor(colorstyle) specifies the color and opacity of the inside of the marker. See [G-4] colorstyle for a list of color choices.

mlcolor(colorstyle), mlwidth(linewidthstyle), mlalign(linealignmentstyle), and mlstyle(linestyle) specify the look of the line used to outline the shape of the marker. See lines, but you cannot change the line pattern of a marker.

mstyle(markerstyle) specifies the overall look of markers, such as their shape and their color. The other options allow you to change each attribute of the marker, but mstyle() is a starting point.

You need not specify mstyle() just because there is something you want to change about the look of the marker and, in fact, most people seldom specify the mstyle() option. You specify mstyle() when another style exists that is exactly what you desire or when another style would allow you to specify fewer changes to obtain what you want.

See [G-4] markerstyle for a list of available marker styles.

pstyle(pstyle) specifies the overall style of the plot, including not only the markerstyle, but also the markerlabelstyle and all other settings for the look of the plot. Only the markerstyle and markerlabelstyle affect the look of markers. See [G-4] pstyle for a list of available plot styles.

recast(newplottype) is an advanced option allowing the plot to be recast from one type to another, for example, from a scatterplot to a line plot; see [G-3] advanced_options. Most, but not all, plots allow recast().


You will never need to specify all nine marker options, and seldom will you even need to specify more than one or two of them. Many people think that there is just one important marker option,


msymbol() specifies the shape of the symbol; see [G-4] symbolstyle for choice of symbol. A few people would add to the important list a second option,


mcolor() specifies the marker's color and opacity; see [G-4] colorstyle for choice of color. Finally, a few would add


msize() specifies the marker's size; see [G-4] markersizestyle for choice of sizes.

After that, we are really into the details. One of the remaining options, however, is of interest:


A marker has a set of characteristics:

{shape, color, size, inside details, outside details}

Each of the options other than mstyle() modifies something in that set. mstyle() sets the values of the entire set. It is from there that the changes you specify are made. See [G-4] markerstyle.

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index