![]() axis choice options associate the plot with a particular y or x axis on the graph see axis choice options. ![]() I’ve tried using linkplot – from SSC (sencode also came from SSC): Code: gen date = date (week, "MDY") sort date sencode week, gen (week2) linkplot prob week2 if group=1, link (id) But I wasn’t able to display different lines (ids) using different colors, nor to display a legend that says which line is which id (if lines had different Grids are lines that extend from an axis across the plot region.For example: Code: webuse hypoxia, clear stset dftime, failure (failtype=1) stcrreg ifp tumsize pelnode, compete (failtype=2) stcurve, cif at1 (pelnode=0) at2 For example, Code: A Google search (with "stata + break lines in do files") would have easily gotten you there. lpattern() is not allowed with graph pie see graph pie. I’ve found that specifying a custom scheme with RGB color codes is the easiest way to get the colors I want from Stata, and then match them perfectly in PowerPoint.Now, these colors will show up as defaultsįor your font/object of interest, click the color selector and choose ‘More Colors:’Įnter the color values corresponding to a color you picked and draw / type with it.Stata line color multiple lines. ), and specify it either globally with -scheme- or as an option to individual -graph- commands. Add it to your sysdir by specifying its enclosing folder with -adopath- (eg: if you saved the scheme file to “x:/yourfolder/,” use -adopath ++ x:/yourfolder/. If I use OSU colors, that means replacing color p1 navyįor scarlet, gray, white and black, respectively (note: these colors aren’t very useful for presentation graphics!). So, if you expect to produce figures with varying numbers of colors, specify colors in descending order of preference, so that p1 is your favorite. That means that if you have a scatterplot with a single marker color, it’s going to be navy by default. Stata uses the colors in order of need, starting with p1 for plot area things like lines, bars and markers. … and only replacing the values I thought would be used. I found it most useful to replace the values in this section: color p gs6 Open the file in a text editor or the do-file editor. Pick a scheme file I chose scheme-s2color.scheme. Visit the Stata program folder and browse to /ado/base/s/. Often these will use Pantone colors OSU’s color palette specifies the RGB values, but if all you have are Pantone or CMYK you’ll need to find a converter. Let’s say you have an institutionally-prescribed color scheme. Will produce scatterplots with red, green and blue markers, respectively. Read on…įirst, you can specify RGB codes in Stata, eg: scatter mpg weight, mcolor("255 0 0") scatter mpg weight, mcolor("0 255 0") scatter mpg weight, mcolor("0 0 255") I’ve found that specifying a custom scheme with RGB color codes is the easiest way to get the colors I want from Stata, and then match them perfectly in PowerPoint. Stata’s built-in color schemes are fine for banging out drafts, but for presentations where you want a custom color scheme it’s often easier to produce your own scheme than to either find acceptable colors in Stata’s palette or define color codes every time you produce a figure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |