Announcement

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

  • Two way area - lines get "thin" as they move up

    Example code:
    Code:
    set obs 200
    gen indicator = uniform()<=0.5
    gen y = _n
    twoway (area indicator y)
    As you can see, the lines get "thin" as they move up on the y-axis. Is there any way to change that?
    Click image for larger version

Name:	example_statalist.PNG
Views:	1
Size:	194.0 KB
ID:	1525247


  • #2
    I think you can use another kind of graph like "spike". This is my example. I am not sure whether it is what you need.

    Code:
    set obs 200
    gen indicator = uniform()<=0.5
    gen y = _n
    twoway (spike indicator y, lwidth(thick))
    Click image for larger version

Name:	1574128358.png
Views:	1
Size:	34.4 KB
ID:	1525254

    Comment


    • #3
      #1 is inevitable. You are plotting trapezia in general, so the sides are sloping,

      Comment

      Working...
      X