Announcement

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

  • Problems with graph bar, and name

    Dear all,
    I wonder if someone can offer a solution to a problem i encounter when using graph bar command.
    Specifically, if i use "graph bar x, over(z, label(angle(v)) name(m1)" , the command seems to skip the "name" option altogether.

    for example

    Code:
    sysuse auto
    gen id=_n
    * G1
    graph bar weight length , over ( id, label(angle(v) ) ) name(m1)
    * G2
    graph bar weight length , over ( id, label(angle(v) ) ) name(m1) 
    * G3
    graph bar weight length , over ( id ) name(m1)
    * G4
    graph bar weight length , over ( id ) name(m1)
    Notice that the first two graphs of commands (g1 and g2) will run smoothly because both graphs are named "graph". However, when the label angle option is dropped, the "name" option is recognized and used (thus giving an error on G4).

    This seems to be a bug, and have just reported it, but in the meantime, I thought someone may have alternative solutions.
    Thank you.
    F

  • #2
    Reverse the order of options:

    Code:
    sysuse auto
    gen id=_n
    * G1
    graph bar weight length , name(m1) over ( id, label(angle(v) ) )
    * G2
    graph bar weight length , name(m1) over ( id, label(angle(v) ) )

    Comment


    • #3
      Thank you, Andrew
      I also realized that, if i take the space between over and the parathesis, the graph works.

      Comment

      Working...
      X