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

Happy Valentines Day - Stata style

2/14/2016

1 Comment

 
Happy Valentine's Day! Combine today with Stata and you get a heart shaped graph. The one I made below was made using graph3d in Stata. 
​
Picture
Did you notice I also used the "<3" marker labels here? Hearts on hearts on this graph ;) 

Below is the code I used to make the heart graph. I added the title, note, and other options using the graph editor. 
  
/* Author: Belen Chavez 
     Stata Heart Code 
     Happy Valentine's Day <3 */ 

clear all
set obs 463
gen t = . 
local c = 1  
forv i = 0(0.05)`=2`c(pi)''{
        replace t = `i' in `c'
        local ++c
}

gen x = 16*sin(t)^3
gen y = 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
gen mlab = "<3"
graph3d x y t , colorscheme(cr) scale(3) markeroptions(mlab(mlab)) 

Happy Valentine's Day to my blog readers <3 
1 Comment
Fahim Ahmad link
9/13/2018 04:14:59 am

This is excellent, I like it.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    My name is Belen, I like to play with data using Stata during work hours and in my free time.  I like blogging about my Fitbit, Stata, and random musings.

    If you like the Stata posts you see here, I guarantee you'll also like what's over at
    wmatsuoka.com


    Archives

    March 2018
    January 2018
    September 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015


    Categories

    All
    API
    Beer
    BJJ
    BreweryDB
    CURL
    Education Research
    Excel
    Fitbit
    Fitbit API
    Google
    Google Charts API
    Google Maps
    LinkedIn
    Love
    Parsing
    PPIC
    Putexcel
    Rant
    San Diego
    Stata
    Tableau
    Twitter API
    Valentine's Day


Powered by Create your own unique website with customizable templates.
  • Introduction
  • About
  • Data Blog
  • Calligraphy
  • Teaching