This is exactly the same script as Simple Script, but after
generating HTML we run the command
bundle using simpleScript to produce
If you choose
view source in your browser you will see that the image is now bundled in.
Let us read the fuel efficiency data that is shipped with Stata
. sysuse auto, clear (1978 Automobile Data)
To study how fuel efficiency depends on weight it is useful to transform the dependent variable from "miles per gallon" to "gallons per 100 miles"
. gen gphm = 100/mpg
We then obtain a more linear relationship
. twoway scatter gphm weight || lfit gphm weight /// > , ytitle(Gallons per Mile) legend(off) . graph export auto.png, width(500) replace (file auto.png written in PNG format)
That's all for now!