![]() By default, the elements in Stata graph is not transparent, or 100% opaque. Reference lines are a powerful way to enhance your graphs.In this post, I’m going to show you how to adjust the transparency of your Stata graph. You can even use reference lines for a categorical variable on a discrete axis. You can display labels for reference lines. You can display a line to indicate a reference value or a sample statistic. This article shows several ways to use the REFLINE statement in PROC SGPLOT to add information to your graphs. Although you can use the COLORBANDS= option on the YAXIS statement to add alternating bands of colors to a graph, the REFLINE statement enables you to add lines that are not strictly alternating or that vary in width.Use reference lines to highlight a category of interest.Sanjay Matange shows two creative uses for reference lines for a discrete axis: Labelloc=inside label= "Fiscal /Year " splitchar= "/" /* split label */īecause you can control the thickness of the reference lines, you can use them for many purposes. Refline "19Q2" / axis= x discreteoffset= 0.5 /* move ref line to right */ * for a discrete variable, specified the formatted value */ The REFLINE statement supports a SPLITCHAR= option that you can use to split a long label across multiple lines. ![]() In the example, DISCRETEOFFSET=0.5 moves the line between the reference category and its neighbor to the right. Positive values move the line to the right negative values move the line to the left. You can use the DISCRETEOFFSET= option and a value in the interval to move the line left or right of center.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |