Announcement

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

  • Same color for all lines in a graph

    Dear Statalisters, is there a quick way to specify a given line color to *all* lines plotted in a two-way plot without repeating the option as many times as the number of lines to be plotted (the same idea applies also to line pattern or line width, for example)?

    In the silly example below, is there a way to specify the line color option red only once but at the same time get all the 4 lines plotted in red?

    Code:
    clear
    range x 0 100 100
    forv i = 1/4 {
        gen y`i' = runiform()
    }
    
    tw (line y* x, lc(red red red red))

  • #2
    Code:
     
     tw (line y* x, lc(red ..))

    Comment


    • #3
      Thank you, Nick.
      (Is it documented somewhere?)

      Comment


      • #4
        A quick search didn't find a source. Sorry, but it's there somewhere.

        Comment


        • #5
          Code:
          help stylelists

          Comment

          Working...
          X