Belen Chavez
  • Introduction
  • About
  • Teaching
  • Data Blog
  • Calligraphy

Gcharts

calendar chart

8/6/2016

0 Comments

 
/*Calendar Chart*/
gchart calendar temp date, title("SeaTac Average Temperature") gsize(12) ///
        gc(opac(0.75)) mfcolor(blue lawngreen) ///
        yrlabel(color(blue) bold) outline(color(orange)) ///
        molab(color(black))

        
        

0 Comments

Stata scheme

7/28/2016

2 Comments

 
In this example, we'll be customizing options so that our graph looks a lot more familiar. 

sysuse sp500, clear

/*Stata Scheme*/
gchart line high low date, ///
        lcolor(navy maroon) title("S&P 500 - Stata Color Scheme", color(#1e2d53) size(34) font("Arial") ) ///
        xtitle("Date", color(black) font(Arial) italic) ytitle("Price", color(black) font(Arial)) ///
        graphregion(fcolor(#eaf2f3, html)) plotregion(fcolor(white)) ///
        xlab(#7, glcolor(white)) ylab(#6,glcolor(#eaf2f3) angle(90)) legend(position(bottom))
                
Giving us the following graph:
We plan on adding a scheme(stata) option in a future release of gcharts. In the meantime, help files will list the color/axis/grid options for rendering Stata-looking graphs.
2 Comments

area chart

7/19/2016

0 Comments

 

twoway area change date

/*Area*/
gchart area change date, ytitle("Closing price change") xtitle("Date") ///
        title("Area Chart")

/*Stepped Area*/
gchart area change date, ytitle("Closing price change") xtitle("Date") ///
        title("Stepped Area Chart") step

0 Comments

bar chart

7/19/2016

0 Comments

 

twoway bar high low date
 
gchart column high low date, title("Column Chart")
 
gchart bar high low date, orientation(horizontal) title("Horizontal Bar Chart")


0 Comments

scatter chart

7/19/2016

0 Comments

 

sysuse sp500, clear

gchart scatter open close date, msymbol(star triangle) msize (medium 10) ///
        title("S&P 500", bold italic) xtitle("Date", color(blue)) ytitle("Prices", color(green))

0 Comments

line chart

7/19/2016

0 Comments

 

sysuse sp500, clear

twoway line low high date, title("S&P500", color(blue) bold) ///
        lcolor(red blue) lwidth(thick medthick) lpattern(dash_dot solid)
        

gchart line low high date, title("S&P500", color(blue) bold) ///
        lcolor(red blue) lwidth(thick medthick) lpattern(dash_dot solid)
        

0 Comments

    About

    gcharts is a a program we co-wrote. This page is a  portfolio of some basic examples. We will be adding more (complicated) examples shortly.

    For more information:
    Check out our Stata presentation here

    Or read this blog post introducing gcharts

    Authors

    Belen Chavez
    William Matsuoka

    Last updated:
    July 2016

    Examples

    All
    Area
    Bar
    Calendar
    Line
    Scatter

Proudly powered by Weebly
  • Introduction
  • About
  • Teaching
  • Data Blog
  • Calligraphy