大数据人|大数据第一社区

 找回密码
 注册会员

扫一扫,访问微社区

查看: 1305|回复: 0
打印 上一主题 下一主题

Happy valentine's Day

[复制链接]
  • TA的每日心情
    奋斗
    2015-7-30 23:05
  • 签到天数: 12 天

    [LV.3]偶尔看看II

    852

    主题

    972

    帖子

    4804

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    4804
    QQ
    跳转到指定楼层
    楼主
    发表于 2015-11-19 19:16:29 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式


    【问题】
    Stata能为情人节干嘛呢?
    送点礼物吧,画个图。
    【方法】
    极坐标里面很有很多好玩的图
    比如:Rose Curve
    参考:
    R送个情人节礼物,这个才真好
    http://cos.name/2012/02/valentines-gift-by-using-r/
    【求教】
    Stata怎么给极坐标画图呢?
    比如:很想把玫瑰r(θ)=a*sin(kθ)加到心形中间。
    【例子】
    drop _all
    range t 0 2*_pi 1000
    gen x=16*sin(t)^3
    gen y=13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
    egen x_min=min(x)
    egen x_max=max(x)
    egen y_min=min(y)
    egen y_max=max(y)
    gen a=(x-x_min)/(x_max-x_min)
    gen b=(y-y_min)/(y_max-y_min)
    line b a
    gr_edit yaxis1.draw_view.setstyle, style(no)
    gr_edit xaxis1.draw_view.setstyle, style(no)
    gr_edit plotregion1.AddTextBox added_text editor .7055394244311991 .2810707216715078
    gr_edit plotregion1.added_text_new = 1
    gr_edit plotregion1.added_text_rec = 1
    gr_edit plotregion1.added_text[1].style.editstyle  angle(default) size(medsmall) color(red) horizontal(left) vertical(middle) margin(zero) linegap(zero) drawbox(no) boxmargin(zero) fillcolor(bluishgray) linestyle( width(thin) color(black) pattern(solid)) box_alignment(east) editcopy
    gr_edit plotregion1.added_text[1].style.editstyle size(large) editcopy
    gr_edit plotregion1.added_text[1].text = {}
    gr_edit plotregion1.added_text[1].text.Arrpush Happy Valentine's Day

    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册会员

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条


    id="mn_portal" >首页Portalid="mn_P18" onmouseover="navShow('P18')">应用id="mn_P15" onmouseover="navShow('P15')">技术id="mn_P37" onmouseover="showMenu({'ctrlid':this.id,'ctrlclass':'hover','duration':2})">前沿id="mn_P36" onmouseover="navShow('P36')">宝箱id="mn_P61" onmouseover="showMenu({'ctrlid':this.id,'ctrlclass':'hover','duration':2})">专栏id="mn_P65" >企业id="mn_Nd633" >导航 折叠导航 关注微信 关注微博 关注我们

    QQ|广告服务|关于我们|Archiver|手机版|小黑屋|大数据人 ( 鄂ICP备14012176号-2  

    GMT+8, 2024-5-19 18:37 , Processed in 0.261208 second(s), 34 queries .

    Powered by 小雄! X3.2

    © 2014-2020 bigdataer Inc.

    快速回复 返回顶部 返回列表