3/16/2023 0 Comments Label xline stata![]() ![]() What is "n(#)" for? This tells Stata to draw the plot at 20 points. In our case, we specified that the new plot type is a connected graph, for which you can specify marker symbols. The recast option will tell Stata to treat the plot as a new plot. Tw function y = x^2, range(-2 2) recast(connected) msymbol(O) || ///įunction y = x^3, range(-2 2) recast(connected) msymbol(T) n(20) || ///įunction y = x^4, range(-2 2) recast(connected) msymbol(S) n(20) /// For example:įunction y = x^3, range(-2 2) lpattern(-) || ///įunction y = x^4, range(-2 2) lpattern(.-) ///Ĭols(3) pos(5) ring(0) region(lcolor(none)))īut suppose you prefer to use marker symbols rather than line patterns to differentiate the line plots, how can you specify this option? Use the recast option (-help advanced_options-): ![]() These options are particularly helpful when you have many functions to plot. Tw function y = 4*x^2, range(-2 2) lcolor(red) lwidth(medthick) lpattern(-) For example, if you want to change the color, width, and pattern of the line use lcolor, lwidth, and lpattern options: It is easy to change the line attributes of the plot. If you want to draw the other side of the parabola or change the range, you can specify the range as follows: The default is that the function is drawn over the range. For example, the half of a parabola with the equation y = x^2 can be drawn by typing: Stata's -graph twoway function- draws the line plot of a specified function. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |