Announcement

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

  • Stata adds random line to my graphs

    Stata adds random line to my graphs and I need it not to do so. Has anyone tried this? - and can anyone fix this?

    Click image for larger version

Name:	Skærmbillede 2017-03-28 kl. 09.44.55.png
Views:	1
Size:	56.5 KB
ID:	1380618

  • #2
    What was your exact command code?

    Comment


    • #3
      I don't have the excact code for the graph on this computer, but it is based on this code:

      twoway (rarea Typical_cil Typical_cih aar, lcolor(maroon))(rarea Worst_cil Worst_cih aar, ///
      lcolor(green)) (rarea Best_cil Best_cih aar, lcolor(red)) (line Reference_prop aar, lcolor(navy)) (line Typical_prop aar, lcolor(maroon)) ///
      (line Worst_prop aar, lcolor(green)) (line Best_prop aar, lcolor(red))(rarea Reference_cil Reference_cih aar, ///
      lcolor(navy)), ///
      title(Treatment provided over time for each patient type) ///
      xlabel(2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014) ///
      yscale(range(0 1)) ylabel(#6) ///
      ytitle(Proportion of relevant treatment) ///
      xtitle(Time (Year)) ///
      legend(rows(2) order(1 "Reference" 2 "Typical" 3 "Worst" 4 "Best")) ///
      xline(0)


      Comment


      • #4
        You have produced a graph and you can't show us the code? This isn't serious yet. What I see in the code you've given is xline(0). What I see in the graph you have shown is a xline at about 2009.5. Is that the line you don't want? Inspect your real code for xline() calls.

        Comment


        • #5
          I am sorry for not having shared the updated code but I am not at my office until this afternoon. Thank you for the tip regarding xline - I will test whether removing that option solves my problem as soon I have access to the pc - and post the real code and whether it worked. Thank you!

          Comment

          Working...
          X