Announcement

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

  • Export graph with changing name to a folder in loop

    Dear All,

    I'm trying to use loop to generate graphs of a list of variables, and export the graphs to a specific folder, and save the graphs with graph names being the looping variables. The following code does not work properly.
    Code:
     
     foreach var of varlist a-z{                 capture noisily ///                 catplot `var', title(`var')                 graph export "\Graphs\`var'.png"                 }
    Any help will be appreciated!

    Thank you very much!

    Best,
    Craig

  • #2
    Forward slashes not backward slashes.

    Comment


    • #3
      Thank you, Nick!

      Comment

      Working...
      X