# st: Help with Graphs

 From Cameron Hooper <[email protected]> To [email protected] Subject st: Help with Graphs Date Tue, 21 Dec 2004 21:30:38 -0500

```Hi

I am new to Stata and am looking for some help with graphs. I've looked
at the Users/Getting Started Guides and I'm okay with the basics.
However, I'm having trouble making the step to more advanced graphs. I
have access to the Graphics Manual, but it's more of a reference than an
guide. I'll get it with time, but I'm hoping to get up to speed with
graphs reasonably quickly.

Would anyone be willing to show me how to use STATA to create the graph
at the link given below? I realize this might be an unreasonable
request. If so, no worries, just ignore me. But if anyone could help me
out, I'd be grateful. The graph is reasonably complex so examining the
code needed to produce it will teach me a lot in a short period of time.

The example graph is available at:

http://www-personal.umich.edu/~chooper/stata/portfolio_plot.pdf

The data used to generate the plot is available at:

http://www-personal.umich.edu/~chooper/stata/testdata.dta

The x-axis variable is "erc", the y-axis variable is "q"

The line labeled Quadratic regression is the function:

f(x) = 0.316 + 1.248*x - 1.301*x**2 (0 <= x <= 1)

The line labeled Regime Switching regression is the function:

|  0.35299 + 0.692*x if 0 <= x <= 0.461
g(x) = |
|  0.96888 - 0.644*x if 0.461 < x <= 1

Despite the appearance of the pdf I want the plot to be in black and
white. If it matters, I will be saving the graph as a png file for
importing into a LaTeX document. (I use pdflatex so eps files won't work
without conversion.)

If you read this far then thanks! I hope you can help me out.

Cameron

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```