Announcement

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

  • What's is wrong with my graph

    Hi, all. I am not sure why I get this horizontal line in the graph. It seems that when the graph is generated, it does not show up but only shows up in the graph when saved. I also had the same issue on Stata18. Thanks!

    Code:

    * Graph
    graph twoway (rcap cal_ul_var cal_ll_var quarter_jitter2, msize(*.5) color(blue) yline(12321, lstyle(foreground)) yaxis(1)) ///
    (scatter cal_mean_value_var quarter_jitter2, msize(*.5) color(blue) yaxis(1) ytitle("Food Expenditure, deflated", size(3) axis(1)) xtitle("Reference Quarter", size(3) axis(1))), ///
    ylabel(70(5)100, angle(0)) ///
    xscale(range(0.5 4.5)) ///
    xtick(0.5 1.5 2.5 3.5 4.5) ///
    xlabel(1 "Q1 (Jan-Mar)" 2 "Q2 (Apr-Jun)" 3 "Q3 (Jul-Sep)" 4 "Q4 (Oct-Dec)", labsize(2.5) nogrid noticks) ///
    title("Survey: MWI_IHS_2019", size(3)) ///
    note("NOTE: Lean season: Jan, Feb, Nov, & Dec. Computed using recall method. Using derived prices (i) and median for each district and each quarter when (1) not available.", size(1.5)) ///
    legend(off) //

    graph export "${outputloc}meals_stats/graphs/MWI/IHS_2019/_fexp_median_plus_cpi/Food_Exp.png", as(png) replace
    graph export "${outputloc}meals_stats/graphs/MWI/IHS_2019/_fexp_median_plus_cpi/Food_Exp.pdf", as(pdf) replace
    Click image for larger version

Name:	Food_Exp.png
Views:	1
Size:	63.6 KB
ID:	1781747

  • #2
    Without the ability to reproduce your problem, answers may be limited to those who have experienced the exact same issue. I suggest creating a reproducible example of the problem. Also, your scheme appears to be s1color, but I do not see a scheme() option in your command—perhaps you set it earlier. You should include this information, as well as your exact version of Stata (if it is not the latest). See FAQ Advice #12 for details on the aforementioned.

    Comment

    Working...
    X