Announcement

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

  • How can I edit the number that the x axis starts with in a twoway graph?

    Hi! How can I edit the number that the x axis starts with in a twoway graph? For example, from 0
    this is my code:
    twoway (bar Aprobacióndelgobierno PresentaAC, barw(0.15)) || (rcap yu y1 PresentaAC), legend(order(1 "Aprobación Promedio" 2 "IC")) xlabel(0 "No" 1 "Sí") ytitle(`"Aprobación de Gobierno (%)"') ylabel(, angle(horizontal))

  • #2
    Please

    * show graphs that you are talking about, so that we can see the problem

    * (not essential here, but never useless) show example data using dataex

    Both points are covered at https://www.statalist.org/forums/help#stata

    The answer to your question was already included in the code in my answer to your last question, #2 at
    https://www.statalist.org/forums/for...-show-averages

    In short, the xscale() option can be used to extend the x axis.

    Code:
    help axis scale options
    Please read the rest of the FAQ Advice (first link here) now. Among other things, it points up the value of

    * closing a thread with thanks -- or a statement of how you solved the problem differently

    * cross-referencing related threads if you start something that grows out of an earlier thread

    If you don't do that, active users here are likely to guess that they could use their time more profitably.

    Comment

    Working...
    X