Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • improve the speed of plotting graph

    Hi

    I am using this code to plot a graph. The speed is super low in a way that after almost an hour Stata is unable to complete the graph. I mean the Xtitle and Ytitle never completed. Is there any way to do with code to plot this graph completely?

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(shar_no_imm imm_shar_dis)
     .7264661 1.4
     .7264661 1.4
     .7264661 1.4
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .6420745 1.3
     .6420745 1.3
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .6420745 1.3
     .6420745 1.3
     .6420745 1.3
     .6420745 1.3
     .6420745 1.3
     .6420745 1.3
     .6420745 1.3
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .6420745 1.3
     .3460415  16
     .2415024 7.9
     .3460415  16
     .3460415  16
    .58779365 3.5
    .58779365 3.5
    .58779365 3.5
    .58779365 3.5
    .58779365 3.5
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .3460415  16
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .5975055 2.7
     .2415024 7.9
     .5975055 2.7
     .5975055 2.7
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .2415024 7.9
     .5975055 2.7
     .5975055 2.7
     .3460415  16
     .2415024 7.9
     .5975055 2.7
     .2415024 7.9
     .2415024 7.9
    end
    Listed 100 out of 2611882 observations
    Code:
    twoway lfit shar_no_imm imm_shar_dis , lc(black) ///
    || scatter shar_no_imm imm_shar_dis, ms(Oh) msize(medlarge) mlabel(share_2) mcolor(gs10) msize(small) mlabvpos(pos) ytitle(Share of firms with zero foreign workers) yla(, ang(h)) xtitle(The share of immigrants in the districts) legend(off)
    Cheers,
    Paris


  • #2
    Lose duplicate observations, at least temporarily.

    Comment


    • #3
      Thank you so much Prof Nick. It worked now.

      Comment

      Working...
      X