You need a graph that the majority successfully communicates your message. You need a graph that matches the type of your journal. You need a graph with colours that everybody can differentiate. Otherwise you need a graph in grayscale.
In any case, you begin with a graph of your information or outcomes, and you could rework that graph into the type you need.
To exhibit, I take advantage of a graph with overlaid scatterplots, mannequin match traces, and a confidence interval. To acquire the graph, I kind
. twoway scatter observed1 observed2 day, colour(%8 %8) ||
line ols ar1 day , ||
rarea ul ll day , colour(graypercent20)
title(Seasonal Adjustment Issue)
This graph principally makes use of Stata’s defaults. The one exception is the transparency within the scatterplot markers and confidence interval space I requested utilizing %8 and %20 inside the colour() choice.
With this command, I get
Or with the identical twoway command, I’d get any of the next graphs.
What produces these variations? Schemes.
By altering the graph scheme, I can simply change the general look of my graph. To acquire the set of graphs above, I typed
. set scheme economist . set scheme s1rcolor . set scheme plottig . set scheme plotplain . set scheme uncluttered . set scheme lean2
and following every of those set scheme instructions, I ran the twoway command once more.
The s2color scheme is the default whenever you set up Stata. That is the scheme that created the graph on the prime. The set scheme command modifications the default graph type. Stata offers 11 schemes from which you’ll select; these schemes are mentioned in [G-4] schemes intro. That is the place you’ll discover data on utilizing the economist and s1rcolor schemes that I used above.
The schemes offered by Stata are solely a place to begin. Many members of Stata’s consumer neighborhood have additionally contributed schemes. For example, the plottig and plotplain schemes that I used had been created by Daniel Bischof and described in his Stata Journal article “New graphic schemes for Stata: plotplain and plottig“. The uncluttered scheme was offered by Grey Kimbrough. The lean2 scheme was created by Svend Juul and is mentioned in his Stata Journal article “Lean mainstream schemes for Stata 8 graphics“. For those who just like the type of one of many final 4 graphs, you possibly can merely obtain and set up the corresponding scheme and set it as your scheme earlier than creating your graphs. If none of those schemes create the type you need, attempt typing search scheme in Stata to find and set up different schemes.
And if none of these schemes are fairly what you had in thoughts, you possibly can write your individual scheme. To find out about this, kind
. assist scheme information
in Stata. Then, have a look at Vince Wiggins’ discuss “Scheming your approach to constant graphs” from the 2006 UK Stata Customers Group assembly. It would information you thru the method.
Don’t need to write code to create a personalized graph type? You’ll be able to level and click on to perform the identical objective. You begin by drawing a graph. Then, open the Graph Editor and make your modifications. If these are modifications that you just wish to apply to many different graphs, file them. See the crimson dot within the menu beneath? Click on on it to begin the Graph Recorder, and file the modifications as you make them.
If you end, you can provide recording a reputation similar to “recording1”. Then the following time you draw a graph, say
. twoway scatter y x
you need to use graph play to use the identical modifications,
. graph play recording1
Or use the play() choice whenever you create the graph.
. twoway scatter y x, play(recording1)
Kevin Crow explains extra in his Stata Journal article “Stata tip 72: Utilizing the Graph Recorder to create a pseudograph scheme“. It’s also possible to have a look at our YouTube video that demonstrates how you can file modifications and play the recording on different graphs.
So if you wish to change the type of your graphs, attempt one in all Stata’s different schemes, one of many schemes contributed by the neighborhood, a scheme you may have written your self, or maybe a recording from the Graph Editor. No matter your strategy, you possibly can scheme your approach to the type of graphs that you just like finest.







