From the course: Advanced and Specialized Statistics with Stata
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Controlling legends - Stata Tutorial
From the course: Advanced and Specialized Statistics with Stata
Controlling legends
- Let's go ahead and explore how to control and customize graph legends. Legends are an important part of graphs, because they help us identify what is happening on a graph. By default, Stata will always include a legend in a graph when there are multiple overlaying plots. However the default legend can sometimes be rather limited. So we're going to focus on how to embed legend control into our Stata code. This has the advantage of reducing the time spent on manually editing graphs at a later stage. Here's an example of a graph with a custom legend. This legend has custom labels, a reverse order, is stacked into columns, and is located within the data area of our graph on the bottom right hand side. To control the legend of the graph we need to use the legend option, that can be applied to any graph. The legend has various suboptions that allow us to fine tune how legends look like. Within the square brackets of the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Changing the look of markers4m 50s
-
(Locked)
Changing graph colors5m 31s
-
(Locked)
Graphing by groups5m 45s
-
(Locked)
Controlling legends5m 46s
-
(Locked)
Adding text and textboxes6m 43s
-
(Locked)
Sizing graphs4m 13s
-
(Locked)
Combining graphs4m 50s
-
(Locked)
How to use jitter4m 37s
-
(Locked)
How to draw custom functions3m 19s
-
(Locked)
Challenge: More on visualization techniques55s
-
(Locked)
Solution: More on visualization techniques3m 55s
-
(Locked)
-
-
-
-
-
-